[][src]Struct kube::runtime::Reflector

pub struct Reflector<K> where
    K: Clone + DeserializeOwned + Meta
{ /* fields omitted */ }
👎 Deprecated since 0.38.0:

Replaced by kube_runtime::reflector

A reflection of state for a Kubernetes ['Api'] resource

This builds on top of the ['Informer'] by tracking the events received, via ['Informer::poll']. This object will in fact use .poll() continuously, and use the results to maintain an up to date state map.

It is prone to the same desync problems as an informer, but it will self-heal, as best as possible - though this means that you might occasionally see a full reset (boot equivalent) when network issues are encountered. During a reset, the state is cleared before it is rebuilt.

The internal state is exposed readably through a getter.

Implementations

impl<K> Reflector<K> where
    K: Clone + DeserializeOwned + Meta
[src]

pub fn new(api: Api<K>) -> Self[src]

👎 Deprecated since 0.38.0:

Replaced by the kube-runtime crate

Create a reflector on an api resource

pub fn params(self, lp: ListParams) -> Self[src]

👎 Deprecated since 0.38.0:

Replaced by the kube-runtime crate

Modify the default watch parameters for the underlying watch

pub async fn run(self) -> Result<()>[src]

👎 Deprecated since 0.38.0:

Replaced by the kube-runtime crate

Start the reflectors self-driving polling

pub async fn reset<'_>(&'_ self) -> Result<()>[src]

👎 Deprecated since 0.38.0:

Replaced by the kube-runtime crate

Reset the state of the underlying informer and clear the cache

pub async fn state<'_>(&'_ self) -> Result<Vec<K>>[src]

👎 Deprecated since 0.38.0:

Replaced by the kube-runtime crate

Read data for users of the reflector

This is instant if you are reading and writing from the same context.

pub async fn get<'_, '_>(&'_ self, name: &'_ str) -> Result<Option<K>>[src]

👎 Deprecated since 0.38.0:

Replaced by the kube-runtime crate

Read a single entry by name

Will read in the configured namespace, or globally on non-namespaced reflectors. If you are using a non-namespaced resources with name clashes, Try Reflector::get_within instead.

pub async fn get_within<'_, '_, '_>(
    &'_ self,
    name: &'_ str,
    ns: &'_ str
) -> Result<Option<K>>
[src]

👎 Deprecated since 0.38.0:

Replaced by the kube-runtime crate

Read a single entry by name within a specific namespace

This is a more specific version of Reflector::get. This is only useful if your reflector is configured to poll across namespaces. TODO: remove once #194 is resolved

Trait Implementations

impl<K: Clone> Clone for Reflector<K> where
    K: Clone + DeserializeOwned + Meta
[src]

Auto Trait Implementations

impl<K> !RefUnwindSafe for Reflector<K>

impl<K> Send for Reflector<K> where
    K: Send

impl<K> Sync for Reflector<K> where
    K: Send

impl<K> Unpin for Reflector<K> where
    K: Unpin

impl<K> !UnwindSafe for Reflector<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> 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.