Did you know ...
Search Documentation:
Pack consul_client -- prolog/consul_client.pl
HOME
DOWNLOAD
SWI-Prolog
Sources/building
Docker images
Add-ons
Browse GIT
DOCUMENTATION
Manual
Packages
FAQ
Command line
PlDoc
Bluffers
▶
Prolog syntax
PceEmacs
HTML generation
License
Publications
Rev 7 Extensions
TUTORIALS
Beginner
▶
Getting started
Learn Prolog Now!
Simply Logical
Debugger
Development tools
Advanced
▶
Modules
Grammars (DCGs)
clp(fd)
Printing messages
PlDoc
Web applications
▶
Web applications
Let's Encrypt!
Pengines
Semantic web
▶
ClioPatria
RDF namespaces
Graphics
▶
XPCE
GUI options
Machine learning
▶
Probabilistic Logic Programming
External collections
▶
Meta level tutorials
For packagers
▶
Linux packages
COMMUNITY
IRC
Forum & mailing list
Blog
News
Report a bug
Submit a patch
Submit an add-on
Roadmap (on GitHub)
External links
Contributing
Code of Conduct
Contributors
SWI-Prolog items
COMMERCIAL
WIKI
Login
View changes
Sandbox
Wiki help
All tags
consul_services
(-Services:list)
is
semidet
Lists services registered on consul. This only lists the service names, further querying should be performed by
consul_service/2
.
Arguments:
Services
- List of strings, all registered services on the consul agent.
consul_service
(+Service:atom, -Properties:dict)
is
semidet
Lists properties of a service registered on consul. Result is a dict of properties:
Arguments:
Service
- the name of the service, as received from
consul_services/1
.
Properties
- the properties of the queried service, as a dict of:
host
: IP address of the service.
port
: Port of the service.
tags
: Tags associated with the service, as a list.
read_consul_key
(+Key:atom, -Value:atom)
is
semidet
Same as
read_consul_key(Key, Value, [as(atom)])
.
See also
-
read_consul_key/3
read_consul_key
(+Key:atom, -Value:atom, +Options:options)
is
semidet
Reads a key from consul kv database
Arguments:
Key
- Name of the key to query for.
Value
-
Value
of the queried key.
Options
- Provided options are:
as(+Type)
Type of the value. Type can be
list
,
string
,
number
or
atom
.
delete_consul_key
(+Key:atom)
is
det
Deletes a key from consul kv database
Arguments:
Key
- name of the key to delete
update_consul_key
(+Key:atom, +Value:atom)
is
det
Creates or updates a key in consul kv database
Arguments:
Key
- name of the key to update
Value
- new value of the key
register_consul_service
(+Service:atom, +Host:atom, +Port:integer, +Tags:list)
is
det
Registers a service in consul or updates the existing service
Arguments:
Service
- service name to register
Host
- IP address of the service
Port
- port of the service
Tags
- tags associated with the service
deregister_consul_service
(+Service:atom)
is
det
Deregisters a service in consul
Arguments:
Service
- service name to deregister