[][src]Enum kube_runtime::watcher::State

pub enum State<K: Meta + Clone> {
    Empty,
    InitListed {
        resource_version: String,
    },
    Watching {
        resource_version: String,
        stream: BoxStream<'static, Result<WatchEvent<K>>>,
    },
}

The internal FSM driving the Watcher

NOTE: This isn't intended to be used externally or part of the external API, but it's published to document the internal workings.

Variants

Empty

The Watcher is empty, and the next poll() will start the initial LIST to get all existing objects

InitListed

The initial LIST was successful, so we should move on to starting the actual watch.

Fields of InitListed

resource_version: String
Watching

The watch is in progress, from this point we just return events from the server.

If the connection is disrupted then we propagate the error but try to restart the watch stream by returning to the InitListed state. If we fall out of the K8s watch window then we propagate the error and fall back doing a re-list with Empty.

Fields of Watching

resource_version: Stringstream: BoxStream<'static, Result<WatchEvent<K>>>

Trait Implementations

impl<K: Meta + Clone> Debug for State<K>[src]

Auto Trait Implementations

impl<K> !RefUnwindSafe for State<K>

impl<K> Send for State<K>

impl<K> !Sync for State<K>

impl<K> Unpin for State<K>

impl<K> !UnwindSafe for State<K>

Blanket Implementations

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

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

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

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

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

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.