consul.api.coordinates module¶
- class consul.api.coordinates.Coordinate(agent)[source]¶
Bases:
object- datacenters()[source]¶
Returns the WAN network coordinates for all Consul servers, organized by DCs.
- nodes(dc=None, index=None, wait=None, consistency=None)[source]¶
dc is the datacenter that this agent will communicate with. By default the datacenter of the host is used.
index is the current Consul index, suitable for making subsequent calls to wait for changes since this query was last run.
wait the maximum duration to wait (e.g. ’10s’) to retrieve a given index. this parameter is only applied if index is also specified. the wait time by default is 5 minutes.
consistency can be either ‘default’, ‘consistent’ or ‘stale’. if not specified consistency will the consistency level this client was configured with.