src/serve.bend relies on unsafe/foreign
raw source on the hub · import bend-kube-runtime@0.1.1.0/src/serve.bend as Serve
3 imports
import Base import ./runtime.bend as R import ./utf8.bend as U
Types
type AEv source · line 208 · raw
Type
AGot@l:Listener -> @r:Result<&1, &1, Pair(U32, String), Socket> -> AEv
Definitions
def Serve.Res source · line 17 · raw
@-A:Type -> Type
def Serve.size source · line 20 · raw
@s:String -> U32
def Serve.reason.go source · line 23 · raw
@ok:Bool -> @missing:Bool -> String
def Serve.reason source · line 32 · raw
@+code:U32 -> String
def Serve.reply source · line 35 · raw
@+code:U32 -> @ctype:String -> @+body:String -> String
def Serve.first_line.go source · line 40 · raw
@ls:List<&2, String> -> String
def Serve.first_line source · line 47 · raw
@s:String -> String
def Serve.path.go source · line 50 · raw
@parts:List<&2, String> -> String
def Serve.path source · line 58 · raw
@req:String -> String
The request line's path.
def Serve.probe.answer source · line 61 · raw
@m:Poll<&1, &1, Maybe<&1, List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap>>, Unit> -> List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap>
def Serve.probe source · line 70 · raw
@+status:Chan(0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.SMsg) -> IO(List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap>)
Every controller's snapshot from the status keeper, which answers at once (none on a standby replica).
def Serve.all_ready source · line 78 · raw
@ss:List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap> -> Bool
def Serve.ready.go source · line 85 · raw
@standby:Bool -> @ready:Bool -> String
def Serve.ready source · line 95 · raw
@+ss:List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap> -> String
Ready when every controller's store has listed; a standby is ready.
def Serve.bool source · line 98 · raw
@b:Bool -> String
def Serve.head source · line 105 · raw
@+name:String -> @kind:String -> @help:String -> String
def Serve.snap.name source · line 108 · raw
@s:0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap -> String
def Serve.snap.pick.go source · line 113 · raw
@r:Bool -> @+a:U32 -> @+b:U32 -> @+c:U32 -> @+d:U32 -> @+e:U32 -> @i0:Bool -> @i1:Bool -> @i2:Bool -> @i3:Bool -> @i4:Bool -> String
def Serve.snap.pick source · line 129 · raw
@+i:U32 -> @r:Bool -> @+a:U32 -> @+b:U32 -> @+c:U32 -> @+d:U32 -> @+e:U32 -> String
def Serve.snap.field source · line 135 · raw
@s:0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap -> @+i:U32 -> String
The field-th number of a snapshot (0 ready, 1 reconciles, 2 errors, 3 events, 4 running, 5 objects).
def Serve.samples source · line 141 · raw
@ss:List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap> -> @+name:String -> @+field:U32 -> String
One sample per controller, labeled with its kind.
def Serve.family source · line 149 · raw
@+ss:List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap> -> @+name:String -> @kind:String -> @help:String -> @+field:U32 -> String
def Serve.text source · line 154 · raw
@+ss:List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap> -> String
The Prometheus text format: one sample per controller; a standby replica reports only that it leads nothing.
def Serve.metrics source · line 164 · raw
@+ss:List<&2, 0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.Snap> -> String
def Serve.route source · line 168 · raw
@path:String -> @+status:Chan(0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.SMsg) -> IO(String)
The answer to a request.
def Serve.answer.done source · line 179 · raw
@p:Pair(Socket, Poll<&1, &1, Result<&1, &1, Pair(Pair(U32, String), List<&2, U32>), Unit>, List<&2, U32>>) -> IO(Unit)
def Serve.answer source · line 185 · raw
@s:Socket -> @text:String -> IO(Unit)
def Serve.handle.got source · line 189 · raw
@p:Pair(Socket, Poll<&1, &1, Serve.Res(Maybe<&1, String>), Unit>) -> @+status:Chan(0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.SMsg) -> IO(Unit)
def Serve.handle source · line 197 · raw
@s:Socket -> @+status:Chan(0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.SMsg) -> IO(Unit)
def Serve.accepted source · line 201 · raw
@r:Serve.Res(Socket) -> @+status:Chan(0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.SMsg) -> IO(Unit)
def AEv.got source · line 211 · raw
@p:Pair(Listener, Serve.Res(Socket)) -> AEv
def Serve.loop source · line 217 · raw
@fuel:Nat -> @ev:AEv -> @+status:Chan(0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.SMsg) -> IO(Unit)
Accepts forever (fuel permitting), serving each connection on its own.
def Serve.listening source · line 226 · raw
@r:Serve.Res(Listener) -> @+status:Chan(0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.SMsg) -> IO(Unit)
def Serve.run source · line 235 · raw
@+port:U32 -> @+status:Chan(0x7222ee9dc1fb2fecc4a955ab3997433b/src/runtime.SMsg) -> IO(Unit)
Serves the endpoints on 0.0.0.0:port.