docs.rs failed to build etcd-rs-0.2.0-alpha.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
etcd-rs-1.0.1
etcd for Rust
NOTE: Branch master is currently under development. For v0.1.x based releases please check out the v0.1.x branch.
Features
- Asynchronous (Supports async/await syntax)
- Etcd APIv3 (Supported by tonic)
Examples
Usage
Add following dependencies in your project cargo.toml:
[]
= "0.2.0-alpha.1"
Setup Client
let endpoints = vec!;
let client = new;
Key Value
Put
client.kv.put.await?;
Get
Get a key-value pair
let resp = client.kv.get.await?;
List key-value paris by prefix
let resp = client.kv.get.await?;
List all key-value paris
let resp = client.kv.get.await?;
Delete
Delete a key-value pair
client.kv.delete.await?;
Delete key-value paris by prefix
client.kv.delete.await?;
Delete all key-value paris
client.kv.delete.await?;
Lease
Grant
let lease = client
.lease
.grant
.await?;
println!;
// Put key-value with the above lease
client
.kv
.put
.await?;
Revoke
client.lease.revoke.await?;
Keep Alive
use Interval;
let mut interval = new_interval;
loop
License
This project is licensed under the MIT license.