class Consul::Agent
- Consul::Agent
- Consul::Transport
- Reference
- Object
Defined in:
consul/agent/agent.crInstance Method Summary
-
#deregister_check(check_id : String)
deregister_check remove a check from the local agent.
-
#deregister_service(service_id : String)
deregister_service removes a service from the local agent.
- #get_checks(filter : String) : Hash(String, Consul::Types::Agent::Check)
-
#get_checks : Hash(String, Consul::Types::Agent::Check)
get_checks returns all checks that are registered with the local agent.
-
#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
-
#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
- #get_services(filter : String) : Hash(String, Consul::Types::Agent::Service)
-
#get_services : Hash(String, Consul::Types::Agent::Service)
get_services returns all the services that are registered with the local agent
-
#register_check(check : Consul::Check)
register_check adds a new check to the local agent.
-
#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
-
#set_service_maintenenance(service_id : String, enable : Bool, reason = "")
set_serice_maintenence places a given service into "maintenance mode".
-
#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
-
#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
-
#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
-
#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
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_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
deregister_service removes a service from the local agent. If the service does not exist, no action is taken
get_checks returns all checks that are registered with the local agent.
get_service_conf returns the full service definition for a single service instance registered on the local agent
get_local_service_health returns an aggregated state of service(s) on the local agent by name
get_services returns all the services that are registered with the local agent
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
register_service adds a new service, with an optional health check, to the local agent TO-DO: implement kind, proxy, connect
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
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
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
ttl_check_upate is used with a TTL type check to set the status of the check and to reset the TTL clock
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