[][src]Struct etcdv3client::pb::WatchCreateRequest

pub struct WatchCreateRequest {
    pub key: Vec<u8>,
    pub range_end: Vec<u8>,
    pub start_revision: i64,
    pub progress_notify: bool,
    pub filters: Vec<i32>,
    pub prev_kv: bool,
    pub watch_id: i64,
    pub fragment: bool,
}

Fields

key: Vec<u8>

key is the key to register for watching.

range_end: Vec<u8>

range_end is the end of the range [key, range_end) to watch. If range_end is not given, only the key argument is watched. If range_end is equal to '\0', all keys greater than or equal to the key argument are watched. If the range_end is one bit larger than the given key, then all keys with the prefix (the given key) will be watched.

start_revision: i64

start_revision is an optional revision to watch from (inclusive). No start_revision is "now".

progress_notify: bool

progress_notify is set so that the etcd server will periodically send a WatchResponse with no events to the new watcher if there are no recent events. It is useful when clients wish to recover a disconnected watcher starting from a recent known revision. The etcd server may decide how often it will send notifications based on current load.

filters: Vec<i32>

filters filter the events at server side before it sends back to the watcher.

prev_kv: bool

If prev_kv is set, created watcher gets the previous KV before the event happens. If the previous KV is already compacted, nothing will be returned.

watch_id: i64

If watch_id is provided and non-zero, it will be assigned to this watcher. Since creating a watcher in etcd is not a synchronous operation, this can be used ensure that ordering is correct when creating multiple watchers on the same stream. Creating a watcher with an ID already in use on the stream will cause an error to be returned.

fragment: bool

fragment enables splitting large revisions into multiple watch responses.

Methods

impl WatchCreateRequest[src]

pub fn filters(
    &self
) -> FilterMap<Cloned<Iter<i32>>, fn(_: i32) -> Option<FilterType>>
[src]

pub fn push_filters(&mut self, value: FilterType)[src]

Trait Implementations

impl Clone for WatchCreateRequest[src]

impl Default for WatchCreateRequest[src]

impl PartialEq<WatchCreateRequest> for WatchCreateRequest[src]

impl Debug for WatchCreateRequest[src]

impl StructuralPartialEq for WatchCreateRequest[src]

impl Message for WatchCreateRequest[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> IntoRequest<T> for T[src]