[−][src]Function kube_runtime::reflector::reflector
pub fn reflector<K: Meta + Clone, W: Stream<Item = Result<Event<K>>>>(
store: Writer<K>,
stream: W
) -> impl Stream<Item = W::Item>
Caches objects from watcher::Event
s 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 watcher
s, 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