~/bend-docscommunity

src/sys.bend relies on unsafe/foreign

raw source on the hub · import bend-kube-runtime@0.8.1.0/src/sys.bend as Sys

1 import
import Base

Definitions

def Sys.listen.js source · line 25 · raw

String

What the JS lane's Sys.listen.dual answers (effs/sys.js).

def Sys.listen.v4 source · line 28 · raw

@+port:U32 -> @c:U32 -> @+m:String -> @lane:Bool -> IO(Result<&1, &1, Pair(U32, String), Listener>)

def Sys.listen.got source · line 35 · raw

@r:Result<&1, &1, Pair(U32, String), Listener> -> @+port:U32 -> IO(Result<&1, &1, Pair(U32, String), Listener>)

def Sys.listen source · line 47 · raw

@+port:U32 -> IO(Result<&1, &1, Pair(U32, String), Listener>)

A listener on every address of port: IPv6 and IPv4 (dual-stack), so probes and webhooks answer on IPv6-only and dual-stack clusters; IPv4 only on a host without IPv6, and on the JS lane.

Effects (foreign code)

effect Sys.wall source · line 11 · raw

IO(Pair(U32, Pair(U32, U32)))

The wall clock: (days since 1970-01-01, (second of the day, microseconds)). time.bend's Wall.of makes it a Wall.

foreign: src/effs/sys.c, src/effs/sys.js

effect Sys.signal source · line 16 · raw

IO(U32)

Waits for SIGTERM or SIGINT; answers the signal's number.

foreign: src/effs/sys.c, src/effs/sys.js

effect Sys.listen.dual source · line 20 · raw

@port:U32 -> IO(Result<&1, &1, Pair(U32, String), Listener>)

foreign: src/effs/sys.c, src/effs/sys.js

effect Sys.memo_get source · line 54 · raw

@key:String -> @now:U32 -> IO(String)

A process-wide table of short strings that expire (wall-clock seconds, as Wall.secs counts them): what must outlive one request, such as an exec credential plugin's token. A missing or expired key answers "".

foreign: src/effs/sys.c, src/effs/sys.js

effect Sys.memo_put source · line 58 · raw

@key:String -> @value:String -> @until:U32 -> IO(Unit)

foreign: src/effs/sys.c, src/effs/sys.js