def Serve.probe

bend-kube-runtime@0.2.0.0 · src/serve.bend:68

import bend-kube-runtime@0.2.0.0/src/serve.bend as Serve
import Base
import bend-kube-runtime@0.2.0.0/src/runtime.bend as R

68# Every controller's snapshot from the status keeper, which answers at once
69# (none on a standby replica).
70def Serve.probe(+status: Chan(R.SMsg)) -> IO(List<&2, R.Snap>):
71  IO.bind(Chan(List<&2, R.Snap>), List<&2, R.Snap>, Chan.new(List<&2, R.Snap>, 1),
72    +c => IO.bind(Result<&1, &1, R.SMsg, Unit>, List<&2, R.Snap>,
73      Chan.send(R.SMsg, status, R.SGet{c}),
74      u => IO.bind(Poll<&1, &1, Maybe<&1, List<&2, R.Snap>>, Unit>, List<&2, R.Snap>,
75        Chan.try_recv(List<&2, R.Snap>, c, 500),
76        m => IO.pure(List<&2, R.Snap>, Serve.probe.answer(m)))))

Uses (15)

Used by (1)