Skip to content

0.5.0

Compare
Choose a tag to compare
@jimmycuadra jimmycuadra released this 30 Mar 09:18
· 103 commits to master since this release

Breaking changes:

  • Client::default is now implemented via std::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, and Client::version now return a vector of results—one for each etcd member the client was initialized with. Additionally, Client::version has been renamed to Client::versions to make this more clear.
  • The Etcd variant of etcd::error::Error has been renamed Api and its contained type, EtcdError, has been renamed ApiError.
  • Two new variants have been added to etcd::error::Error: InvalidUrl and NoEndpoints. 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 the KeySpaceInfo struct is now wrapped in an Option.
  • The client, error, and keys modules are no longer public. All their user-facing public types are available from the crate root.
  • The fields of the CountStats, FollowerStats, LatencyStats, and VersionInfo structs are no longer wrapped in Options.

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 new ClientOptions struct as an argument and provides support for three new features:
    1. Using a custom certificate authority for HTTPS connections.
    2. Authenticating with the etcd server(s) using client certificates for HTTPS connections.
    3. Authenticating with the etcd server(s) using a username and password for the auth API introduced in etcd 2.2.
  • etcd::error::Error and etcd::error::ApiError now implement std::error::Error.

Improvements:

  • Examples of usage have been added to the crate root documentation.
  • Various improvements to API documentation.