Function kube_runtime::reflector::reflector[][src]

pub fn reflector<K, W>(
    store: Writer<K>,
    stream: W
) -> impl Stream<Item = W::Item> where
    K: Meta + Clone,
    W: Stream<Item = Result<Event<K>>>, 

Caches objects from watcher::Events to a local Store

Keep in mind that the Store is just a cache, and may be out of date.

Note: It is a bad idea to feed a single reflector from multiple watchers, since the whole Store will be cleared whenever any of them emits a Restarted event.

Migration from kube::runtime

Similar to the legacy kube::runtime::Reflector, and the caching half of client-go’s Reflector