pub fn cache<T>(
        &mut self,
        api: Api<T>,
        params: ListParams,
    ) -> (Store<T>, impl Stream<Item = watcher::Event<T>>)
    where
        T: Resource + DeserializeOwned + Clone + Debug + Send + 'static,
        T::DynamicType: Clone + Default + Eq + Hash + Clone,
    {
        let writer = reflector::store::Writer::<T>::default();
        let store = writer.as_reader();

        let watch = watcher::watcher(api, params);
        let cached = reflector::reflector(writer, watch);
        let successful = errors::LogAndSleep::fixed_delay(self.error_delay, cached);
        let initialized = self.initialized.add_handle().release_on_ready(successful);
        let graceful = shutdown::CancelOnShutdown::new(self.shutdown_rx.clone(), initialized);

        (store, graceful)
    }
/// Creates a cached watch with the given [`Api`]
///
/// The returned [`Store`] is updated as the returned stream is polled. If the underlying stream
/// encounters errors, the request is retried (potentially after a delay).
///
/// The runtime is not considered initialized until the returned stream returns at least one
/// event.
///
/// The return stream terminates when the runtime receives a shutdown signal.
Creates a cached watch with the given [`Api`]
The returned [`Store`] is updated as the returned stream is polled. If the underlying stream
encounters errors, the request is retried (potentially after a delay).

The runtime is not considered initialized until the returned stream returns at least one
event.

The return stream terminates when the runtime receives a shutdown signal.
Creates a cached watch with the given [ ` Api ` ] The returned [ ` Store ` ] is updated as the returned stream is polled . If the underlying stream encounters errors the request is retried ( potentially after a delay ) . The runtime is not considered initialized until the returned stream returns at least one event . The return stream terminates when the runtime receives a shutdown signal .
pub fn cache<T>(
        &mut self,
        api: Api<T>,
        params: ListParams,
    ) -> (Store<T>, impl Stream<Item = watcher::Event<T>>)
    where
        T: Resource + DeserializeOwned + Clone + Debug + Send + 'static,
        T::DynamicType: Clone + Default + Eq + Hash + Clone,
    {
        let writer = reflector::store::Writer::<T>::default();
        let store = writer.as_reader();
        let watch = watcher::watcher(api, params);
        let cached = reflector::reflector(writer, watch);
        let successful = errors::LogAndSleep::fixed_delay(self.error_delay, cached);
        let initialized = self.initialized.add_handle().release_on_ready(successful);
        let graceful = shutdown::CancelOnShutdown::new(self.shutdown_rx.clone(), initialized);
        (store, graceful)
    }
pub fn cache < T > ( & mut self , api : Api < T > , params : ListParams , ) -> ( Store < T > , impl Stream < Item = watcher :: Event < T > > ) where T : Resource + DeserializeOwned + Clone + Debug + Send + ' static , T :: DynamicType : Clone + Default + Eq + Hash + Clone , { let writer = reflector :: store :: Writer :: < T > :: default ( ) ; let store = writer . as_reader ( ) ; let watch = watcher :: watcher ( api , params ) ; let cached = reflector :: reflector ( writer , watch ) ; let successful = errors :: LogAndSleep :: fixed_delay ( self . error_delay , cached ) ; let initialized = self . initialized . add_handle ( ) . release_on_ready ( successful ) ; let graceful = shutdown :: CancelOnShutdown :: new ( self . shutdown_rx . clone ( ) , initialized ) ; ( store , graceful ) }
Creates a cached watch with the given [`Api`]
The returned [`Store`] is updated as the returned stream is polled.
Creates a cached watch with the given [ ` Api ` ] The returned [ ` Store ` ] is updated as the returned stream is polled .
&mut self
api
Api<T>
params
ListParams
&mut self
api
Api<T>
params
ListParams