0.5.0
Breaking changes:
Client::default
is now implemented viastd::default::Default
, which requires importing the trait.Client::new
now takes a slice of URLs instead of one URL.Client::self_stats
,Client::store_stats
, andClient::version
now return a vector of results—one for each etcd member the client was initialized with. Additionally,Client::version
has been renamed toClient::versions
to make this more clear.- The
Etcd
variant ofetcd::error::Error
has been renamedApi
and its contained type,EtcdError
, has been renamedApiError
. - Two new variants have been added to
etcd::error::Error
:InvalidUrl
andNoEndpoints
. See the API docs for their purposes. KeySpaceResult
's error type is now a vector of errors, to account for the client supporting multiple etcd members now.- The
node
field of theKeySpaceInfo
struct is now wrapped in anOption
. - The
client
,error
, andkeys
modules are no longer public. All their user-facing public types are available from the crate root. - The fields of the
CountStats
,FollowerStats
,LatencyStats
, andVersionInfo
structs are no longer wrapped inOption
s.
New features:
Client
now accepts multiple URLs for etcd members. Except for API calls that specifically target a member, each API call will try each member in sequence, returning the first successful result. If all members are exhausted without a successful response, the client will return a vector of errors—one for each member it tried.- A new constructor,
Client::with_options
, takes the newClientOptions
struct as an argument and provides support for three new features:- Using a custom certificate authority for HTTPS connections.
- Authenticating with the etcd server(s) using client certificates for HTTPS connections.
- Authenticating with the etcd server(s) using a username and password for the auth API introduced in etcd 2.2.
etcd::error::Error
andetcd::error::ApiError
now implementstd::error::Error
.
Improvements:
- Examples of usage have been added to the crate root documentation.
- Various improvements to API documentation.