Function kube_runtime::controller::applier[][src]

pub fn applier<K, QueueStream, ReconcilerFut, T>(
    reconciler: impl FnMut(K, Context<T>) -> ReconcilerFut,
    error_policy: impl FnMut(&ReconcilerFut::Error, Context<T>) -> ReconcilerAction,
    context: Context<T>,
    store: Store<K>,
    queue: QueueStream
) -> impl Stream<Item = Result<(ObjectRef<K>, ReconcilerAction), Error<ReconcilerFut::Error, QueueStream::Error>>> where
    K: Clone + Meta + 'static,
    ReconcilerFut: TryFuture<Ok = ReconcilerAction> + Unpin,
    ReconcilerFut::Error: Error + 'static,
    QueueStream: TryStream<Ok = ObjectRef<K>>,
    QueueStream::Error: Error + 'static, 

Apply a reconciler to an input stream, with a given retry policy

Takes a store parameter for the main object which should be updated by a reflector.

The queue is a source of external events that trigger the reconciler, usually taken from a reflector and then passed through a trigger function such as trigger_self.

This is the "hard-mode" version of Controller, which allows you some more customization (such as triggering from arbitrary Streams), at the cost of some more verbosity.