Function kube::runtime::reflector [−][src]
pub fn reflector<K, W>(
store: Writer<K>,
stream: W
) -> impl Stream<Item = <W as Stream>::Item> where
K: Resource + Clone,
W: Stream<Item = Result<Event<K>, Error>>,
<K as Resource>::DynamicType: Eq,
<K as Resource>::DynamicType: Hash,
<K as Resource>::DynamicType: Clone,
This is supported on crate feature
runtime
only.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.