Runtime.Keeper.run: def of bend-kube-runtime@0.2.0.0 Import: import bend-kube-runtime@0.2.0.0/src/runtime.bend as Runtime Lines 584-598 of bend-kube-runtime@0.2.0.0/src/runtime.bend: https://jend.leeeet.dev/read.txt?path=bend-kube-runtime@0.2.0.0/src/runtime.bend&start_line=584&end_line=598 import Base # The status keeper: holds each controller's latest snapshot and answers # queries at once. def Keeper.run(fuel: Nat, m: Maybe<&1, SMsg>, +last: Map<&2, Snap>, +inbox: Chan(SMsg)) -> IO(Unit): match fuel m: case 0n x: IO.pure(Unit, Unit{}) case 1n+f None{}: IO.pure(Unit, Unit{}) case 1n+f Some{SPut{i, s}}: IO.bind(Maybe<&1, SMsg>, Unit, Chan.recv(SMsg, inbox), x => Keeper.run(f, x, Map.set(&2, Snap, last, U32.show(i), s), inbox)) case 1n+f Some{SGet{r}}: IO.bind(Result<&1, &1, List<&2, Snap>, Unit>, Unit, Chan.send(List<&2, Snap>, r, Keeper.all(last)), u => IO.bind(Maybe<&1, SMsg>, Unit, Chan.recv(SMsg, inbox), x => Keeper.run(f, x, last, inbox))) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan.recv https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan.send https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map.set https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/runtime.bend&name=Keeper.all https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/runtime.bend&name=SMsg https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/runtime.bend&name=Snap