etcd-rs 0.2.0-alpha.5

etcd client for rust
Documentation

etcd for Rust

Crates.io Docs.rs MIT licensed Travis Build Status Dependency Status

An etcd(API v3) client for Rust, and it provides async/await APIs backed by tokio and tonic.

Documentation on the library can be found at docs.rs/etcd-rs.

NOTE: Branch master is currently under development. For v0.1.x based releases please check out the v0.1.x branch.

Features

  • Asynchronous
  • Etcd APIv3

Examples

./examples

Usage

Add following dependencies in your project cargo.toml:

[dependencies]
etcd-rs = "0.2.0-alpha.1"

Setup Client

let endpoints = vec!["http://127.0.0.1:2379".to_owned()];

let client = Client::connect(ClientConfig {
    endpoints,
    auth: None,
}).await;

if authenticate enabled

let endpoints = vec!["http://127.0.0.1:2379".to_owned()];

let client = Client::connect(ClientConfig {
    endpoints,
    auth: Some(("user".to_owned(), "password".to_owned())),
}).await;

License

This project is licensed under the MIT license.