class Etcd::Client
- Etcd::Client
- Reference
- Object
Included Modules
Defined in:
etcd/client.crConstructors
Instance Method Summary
-
#addrs : Array(String)
Addresses like ['localhost:2379']
-
#addrs=(addrs : Array(String))
Addresses like ['localhost:2379']
-
#api_execute(path : String, method : String, params : Options = Options.new, timeout : Int32 | Nil = nil) : HTTP::Client::Response
This method sends api request to etcd server.
- #config : Config
- #config=(config : Config)
-
#new_client : HTTP::Client
This method returns a new client for a server from list It keeps an internal structure of healthy servers and picks one from the list Currently returns the first server
- #process_http_request(response : HTTP::Client::Response) : HTTP::Client::Response
-
#version
Returns the etcd daemon version
-
#version_prefix
Returns the etcd api version that will be used for across API methods
Instance methods inherited from module Etcd::Stats
stats(kind : Symbol) : JSON::Any
stats,
stats_endpoint
stats_endpoint
Instance methods inherited from module Etcd::Keys
compare_and_swap(key : String, opts : Options = Options.new) : Response
compare_and_swap,
create(key : String, opts : Options)create(key : String) create, create_in_order(dir : String, opts : Options = Options.new) : Response create_in_order, delete(key : String, opts : Options = Options.new) : Response delete, exists?(key) exists?, get(key : String, opts : Options = Options.new) : Response get, key_endpoint key_endpoint, set(key : String, opts : Options = Options.new) : Response set, update(key : String, opts : Options)
update(key : String) update, watch(key : String, opts : Options = Options.new, timeout : Int32 = -1) : Response watch
Constructor Detail
Instance Method Detail
def api_execute(path : String, method : String, params : Options = Options.new, timeout : Int32 | Nil = nil) : HTTP::Client::Response
#
This method sends api request to etcd server.
This method has following parameters as argument
- path - etcd server path (etcd server end point)
- method - the request method used
- options - any additional parameters used by request method (optional)
def new_client : HTTP::Client
#
This method returns a new client for a server from list It keeps an internal structure of healthy servers and picks one from the list Currently returns the first server
def process_http_request(response : HTTP::Client::Response) : HTTP::Client::Response
#