class

Etcd::Client

Inherits Etcd::Stats < Etcd::Keys < Reference < Object

Constructors

new(addrs : Array(String))
Source
new(addrs : Array(String), &)
Source

Instance methods

addrs

Addresses like ['localhost:2379']

Source
addrs=(addrs : Array(String))

Addresses like ['localhost:2379']

Source
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)
Source
config
Source
config=(config : Config)
Source
new_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

Source
process_http_request(response : HTTP::Client::Response) : HTTP::Client::Response
Source
version

Returns the etcd daemon version

Source
version_prefix

Returns the etcd api version that will be used for across API methods

Source