src/kube.bend relies on unsafe/foreign
raw source on the hub · import bend-kube-runtime@0.2.0.0/src/kube.bend as Kube
10 imports
import Base import ./json.bend as J import ./core.bend as C import ./config.bend as K import ./client.bend as Cl import ./queue.bend as Q import ./runtime.bend as R import ./serve.bend as V import ./leader.bend as E import ./log.bend as L
Types
type Opts source · line 21 · raw
Data
max: reconciles at once; port: health and metrics (0: off); leader: the Lease to hold while running; label: the primary watch's label selector.
Opts@max:U32 -> @port:U32 -> @leader:Maybe<&2, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/leader.LOpts> -> @label:String -> Opts
Definitions
def Opts.default source · line 25 · raw
Opts
8 reconciles at once, health and metrics on :8080, no leader election.
def Opts.with_leader source · line 28 · raw
@o:Opts -> @ns:String -> @name:String -> @id:String -> Opts
def Opts.with_label source · line 33 · raw
@o:Opts -> @label:String -> Opts
def Kube.serve.go source · line 38 · raw
@+port:U32 -> @+status:Chan(0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/runtime.SMsg) -> @off:Bool -> IO(Unit)
def Kube.serve source · line 45 · raw
@+port:U32 -> @+status:Chan(0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/runtime.SMsg) -> IO(Unit)
def Kube.elect source · line 48 · raw
@+cfg:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> @l:Maybe<&2, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/leader.LOpts> -> @work:IO(Unit) -> IO(Unit)
def Kube.pool source · line 68 · raw
IO(Chan(Socket))
Up to 8 idle keep-alive connections shared by every request.
Templates
template Kube.start source · line 55 · raw
@-rec:(@_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/json.Json -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> IO(0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/queue.Action)) -> @+cfg:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> @+primary:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/core.Api -> @owned:List<&2, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/core.Api> -> @o:Opts -> IO(Unit)
template Kube.configured source · line 71 · raw
@-rec:(@_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/json.Json -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> IO(0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/queue.Action)) -> @c:Result<&2, &2, String, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config> -> @primary:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/core.Api -> @owned:List<&2, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/core.Api> -> @o:Opts -> IO(Unit)
template Kube.run source · line 81 · raw
@-rec:(@_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/json.Json -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> IO(0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/queue.Action)) -> @primary:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/core.Api -> @owned:List<&2, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/core.Api> -> @o:Opts -> IO(Unit)
Runs a controller for primary, owning owned, reconciling with rec.
template Kube.start_all source · line 89 · raw
@-rec:(@_:U32 -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/json.Json -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> IO(0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/queue.Action)) -> @+cfg:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> @+cs:List<&2, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/runtime.Ctrl> -> @o:Opts -> IO(Unit)
Several controllers in one process, sharing their watches (Manager): rec(i, obj, cfg) reconciles for the i-th controller of cs. Opts.label is unused here (each Ctrl has its own); max likewise.
template Kube.configured_all source · line 99 · raw
@-rec:(@_:U32 -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/json.Json -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> IO(0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/queue.Action)) -> @c:Result<&2, &2, String, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config> -> @cs:List<&2, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/runtime.Ctrl> -> @o:Opts -> IO(Unit)
template Kube.run_all source · line 108 · raw
@-rec:(@_:U32 -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/json.Json -> @_:0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/config.Config -> IO(0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/queue.Action)) -> @cs:List<&2, 0x3e7c8cdf5aa942d4279f8d34c4f1be54/src/runtime.Ctrl> -> @o:Opts -> IO(Unit)