etcdrs 0.1.2

An async etcd v3 client built on tonic and tokio, with composable operation builders and type-safe responses
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use futures_core::Stream;

use crate::client::{WatchBuilder, WatchError, WatchEvent};

/// Driver for [`watch`][crate::Client::watch] operations.
pub trait WatchDriver {
    /// The watcher stream returned by [`start_watch`][Self::start_watch].
    type Watcher: Stream<Item = Result<WatchEvent, WatchError>> + Send;

    /// Start watching using the accumulated watch specs.
    fn start_watch(self, builder: WatchBuilder<()>) -> Self::Watcher;
}