Watcher.Watcher.step: def of bend-kube-runtime@0.2.0.0 Import: import bend-kube-runtime@0.2.0.0/src/watcher.bend as Watcher Lines 158-173 of bend-kube-runtime@0.2.0.0/src/watcher.bend: https://jend.leeeet.dev/read.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&start_line=158&end_line=173 import Base # The state machine. def Watcher.step(st: WState, i: Input) -> Step: match st i: case WState{WList{c}, f, first} IPage{p}: Watcher.page(first, p) case WState{WList{c}, +f, first} IListErr{+code}: Watcher.list_err(c, f, first, Watcher.is_gone(code)) case WState{WWatch{rv}, +f, first} IEvent{ev}: Watcher.event(rv, f, ev) case WState{WWatch{rv}, f, first} IWatchEnd{}: Step{WState{WWatch{rv}, 0, False{}}, Nil{}, False{}} case WState{WWatch{rv}, +f, first} IWatchErr{+code}: Watcher.watch_err(rv, f, Watcher.is_gone(code)) case s _: # an input the phase did not ask for changes nothing Step{s, Nil{}, False{}} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Input https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Phase https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Step https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=WState https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Watcher.event https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Watcher.is_gone https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Watcher.list_err https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Watcher.page https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/watcher.bend&name=Watcher.watch_err