class

Consul::Agent

Inherits Consul::Transport / Reference / Object

Instance methods

deregister_check(check_id : String)

deregister_check remove a check from the local agent. The agent will take care of deregistering the check from the catalog. If the check with the provided ID does not exist, no action is taken

Source
deregister_service(service_id : String)

deregister_service removes a service from the local agent. If the service does not exist, no action is taken

Source
get_checks(filter : String) : Hash(String, Consul::Types::Agent::Check)
Source
get_checks

get_checks returns all checks that are registered with the local agent.

Source
get_service_conf(name : String) : Consul::Types::Agent::ServiceConf

get_service_conf returns the full service definition for a single service instance registered on the local agent

Source
get_service_health(name : String) : Array(Consul::Types::Agent::ServiceHealth)

get_local_service_health returns an aggregated state of service(s) on the local agent by name

Source
get_services(filter : String) : Hash(String, Consul::Types::Agent::Service)
Source
get_services

get_services returns all the services that are registered with the local agent

Source
register_check(check : Consul::Check)

register_check adds a new check to the local agent. Checks may be of script, HTTP, TCP, or TTL type. The agent is responsible for managing the status of the check and keeping the Catalog in sync

Source
register_service(service : Consul::Service)

register_service adds a new service, with an optional health check, to the local agent TO-DO: implement kind, proxy, connect

Source
set_service_maintenenance(service_id : String, enable : Bool, reason = "")

set_serice_maintenence places a given service into "maintenance mode". During maintenance mode, the service will be marked as unavailable and will not be present in DNS or API queries

Source
ttl_check_fail(check_id : String, note : String | Nil = nil)

ttl_check_fail is used with a TTL type check to set the status of the check to critical and to reset the TTL clock

Source
ttl_check_pass(check_id : String, note : String | Nil = nil)

ttl_check_pass is used with a TTL type check to set the status of the check to passing and to reset the TTL clock

Source
ttl_check_update(check_id : String, status : String | Nil = nil, output : String | Nil = nil)

ttl_check_upate is used with a TTL type check to set the status of the check and to reset the TTL clock

Source
ttl_check_warn(check_id : String, note : String | Nil = nil)

ttl_check_warn is used with a TTL type check to set the status of the check to warning and to reset the TTL clock

Source