def Watcher.step
bend-kube-runtime@0.2.0.0 · src/watcher.bend:158
import bend-kube-runtime@0.2.0.0/src/watcher.bend as Watcher
import Base
158
159def Watcher.step(st: WState, i: Input) -> Step:
160 match st i:
161 case WState{WList{c}, f, first} IPage{p}:
162 Watcher.page(first, p)
163 case WState{WList{c}, +f, first} IListErr{+code}:
164 Watcher.list_err(c, f, first, Watcher.is_gone(code))
165 case WState{WWatch{rv}, +f, first} IEvent{ev}:
166 Watcher.event(rv, f, ev)
167 case WState{WWatch{rv}, f, first} IWatchEnd{}:
168 Step{WState{WWatch{rv}, 0, False{}}, Nil{}, False{}}
169 case WState{WWatch{rv}, +f, first} IWatchErr{+code}:
170 Watcher.watch_err(rv, f, Watcher.is_gone(code))
171 case s _:
172
173 Step{s, Nil{}, False{}}