def Ctl.on_outs
bend-kube-runtime@0.2.0.0 · src/runtime.bend:384
import bend-kube-runtime@0.2.0.0/src/runtime.bend as Runtime
import Base
import bend-kube-runtime@0.2.0.0/src/watcher.bend as W
import bend-kube-runtime@0.2.0.0/src/store.bend as S
import bend-kube-runtime@0.2.0.0/src/queue.bend as Q
384def Ctl.on_outs(st: CState, +src: U32, +outs: List<&2, W.Out>, +kind: String, own: Bool) -> CState:
385 match st own:
386 case CState{s, q, x} True{}:
387 CState{S.Store.apply_all(outs, s),
388 Q.Queue.forget_all(Ctl.gone_keys(outs), Q.Queue.add_all(Ctl.self_keys(outs), q)),
389 Stats.events(x, U32.from_nat(List.length(&2, W.Out, outs)))}
390 case CState{s, q, x} False{}:
391 CState{s, Q.Queue.add_all(Ctl.owner_keys(outs, kind), q),
392 Stats.events(x, U32.from_nat(List.length(&2, W.Out, outs)))}