0.5.0
Breaking changes:
Client::defaultis now implemented viastd::default::Default, which requires importing the trait.Client::newnow takes a slice of URLs instead of one URL.Client::self_stats,Client::store_stats, andClient::versionnow return a vector of results—one for each etcd member the client was initialized with. Additionally,Client::versionhas been renamed toClient::versionsto make this more clear.- The
Etcdvariant ofetcd::error::Errorhas been renamedApiand its contained type,EtcdError, has been renamedApiError. - Two new variants have been added to
etcd::error::Error:InvalidUrlandNoEndpoints. 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
nodefield of theKeySpaceInfostruct is now wrapped in anOption. - The
client,error, andkeysmodules are no longer public. All their user-facing public types are available from the crate root. - The fields of the
CountStats,FollowerStats,LatencyStats, andVersionInfostructs are no longer wrapped inOptions.
New features:
Clientnow 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 newClientOptionsstruct 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::Errorandetcd::error::ApiErrornow implementstd::error::Error.
Improvements:
- Examples of usage have been added to the crate root documentation.
- Various improvements to API documentation.