Function kube_runtime::reflector::reflector
source · [−]pub fn reflector<K, W>(
writer: Writer<K>,
stream: W
) -> impl Stream<Item = W::Item>where
K: Resource + Clone,
K::DynamicType: Eq + Hash + Clone,
W: Stream<Item = Result<Event<K>>>,
Expand description
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.