class Consul::Catalog
- Consul::Catalog
- Consul::Transport
- Reference
- Object
Defined in:
consul/client/catalog.crInstance Method Summary
-
#deregister(node : String, datacenter : String | Nil = nil, check_id : String | Nil = nil, service_id : String | Nil = self.nil?)
deregister is a low-level mechanism for directly removing entries from the Catalog.
-
#get_datacenters : Array(String)
get_datacenters returns the list of all known datacenters.
-
#get_nodes(dc : String | Nil = nil, near : String | Nil = nil, node_meta : String | Nil = nil) : Array(Consul::Types::Catalog::Node)
get_nodes returns the nodes registered in a given datacenter
-
#get_nodes_for_service(service : String, datacenter : String | Nil = nil, tag : String | Nil = nil, near : String | Nil = nil, node_meta : String | Nil = nil, filter : String | Nil = nil) : Array(Consul::Types::Catalog::NodeService)
get_nodes_for_service returns the nodes providing a service in a given datacenter
-
#get_service_for_node(node : String, datacenter : String | Nil = nil, filter : String | Nil = nil) : Array(Consul::Types::Catalog::NodeService)
get_services_for_node returns the node's registered services
-
#get_services(datacenter : String | Nil = nil, node_meta : String | Nil = nil) : Hash(String, Array(String))
get_services returns the services registered in a given datacenter
-
#register(node : String, address : String, id : String | Nil = nil, datacenter : String | Nil = nil, service : Consul::Service | Nil = nil, check : Hash(String, String) | Nil = nil, node_meta : Hash(String, String) | Nil = nil)
register is a low-level mechanism for registering or updating entries in the catalog.
Instance methods inherited from class Consul::Transport
client : HTTP::Client
client,
consistency : String
consistency,
delete(path : String) : HTTP::Client::Response
delete,
get(path : String) : HTTP::Client::Response
get,
get_consistency : String
get_consistency,
put(path : String, data : JSON::Any) : HTTP::Client::Responseput(path : String, data : String) : HTTP::Client::Response
put(path : String) : HTTP::Client::Response put
Constructor methods inherited from class Consul::Transport
new(client : HTTP::Client, consistency : String = "default")
new
Instance Method Detail
deregister is a low-level mechanism for directly removing entries from the Catalog. It is usually preferable to instead use the agent endpoints for deregistration as they are simpler and perform anti-entropy
get_datacenters returns the list of all known datacenters. The datacenters will be sorted in ascending order based on the estimated median round trip time from the server to the servers in that datacenter
get_nodes returns the nodes registered in a given datacenter
get_nodes_for_service returns the nodes providing a service in a given datacenter
get_services_for_node returns the node's registered services
get_services returns the services registered in a given datacenter
register is a low-level mechanism for registering or updating entries in the catalog. It is usually preferable to instead use the agent endpoints for registration as they are simpler and perform anti-entropy