bend-kube-runtime Releases (2): 0.2.0.0 0x3e7c8cdf5aa942d4279f8d34c4f1be54 indexed https://jend.leeeet.dev/files.txt?path=bend-kube-runtime@0.2.0.0 0.1.1.0 0x7222ee9dc1fb2fecc4a955ab3997433b unindexed https://jend.leeeet.dev/files.txt?path=bend-kube-runtime@0.1.1.0 Definitions (1124, 1 to 100 shown): LAWS.watch_gone_relists (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=watch_gone_relists) # A watch that answers 410 Gone relists from scratch, at once. law watch_gone_relists: for rv: String for f: U32 for first: Bool for r: String for m: String {W.Watcher.step(W.WState{W.WWatch{rv}, f, first}, W.IEvent{C.WError{C.Status{410, r, m}}}) == W.Step{W.WState{W.WList{""}, f, True{}}, Nil{}, False{}} : W.Step} LAWS.watch_request_gone_relists (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=watch_request_gone_relists) # So does a watch request the server refuses with 410. law watch_request_gone_relists: for rv: String for f: U32 for first: Bool {W.Watcher.step(W.WState{W.WWatch{rv}, f, first}, W.IWatchErr{410}) == W.Step{W.WState{W.WList{""}, f, True{}}, Nil{}, False{}} : W.Step} LAWS.list_gone_relists (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=list_gone_relists) # An expired continue token restarts the list from its first page. law list_gone_relists: for c: String for f: U32 for first: Bool {W.Watcher.step(W.WState{W.WList{c}, f, first}, W.IListErr{410}) == W.Step{W.WState{W.WList{""}, f, True{}}, Nil{}, False{}} : W.Step} LAWS.watch_error_backs_off (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=watch_error_backs_off) # A failed watch request (not 410) retries from the same version after a # backoff, counting the failure. law watch_error_backs_off: for rv: String for f: U32 for first: Bool {W.Watcher.step(W.WState{W.WWatch{rv}, f, first}, W.IWatchErr{500}) == W.Step{W.WState{W.WWatch{rv}, (f + 1 : U32), False{}}, Nil{}, True{}} : W.Step} LAWS.watch_end_resumes (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=watch_end_resumes) # A watch that ends (the server's timeout) resumes from the same version, # with no backoff and no events. law watch_end_resumes: for rv: String for f: U32 for first: Bool {W.Watcher.step(W.WState{W.WWatch{rv}, f, first}, W.IWatchEnd{}) == W.Step{W.WState{W.WWatch{rv}, 0, False{}}, Nil{}, False{}} : W.Step} LAWS.bookmark_advances (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=bookmark_advances) # A bookmark moves the resume version and emits nothing. law bookmark_advances: for rv: String for v: String for f: U32 for first: Bool {W.Watcher.step(W.WState{W.WWatch{rv}, f, first}, W.IEvent{C.WBookmark{v}}) == W.Step{W.WState{W.WWatch{v}, 0, False{}}, Nil{}, False{}} : W.Step} LAWS.last_page_watches (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=last_page_watches) # The last page of a list (no continue token) emits its objects, closes # the relist with InitDone, and starts watching from the list's version. law last_page_watches: for c: String for f: U32 for first: Bool for items: List<&2, J.Json> for rv: String {W.Watcher.step(W.WState{W.WList{c}, f, first}, W.IPage{C.Page{items, rv, ""}}) == W.Step{W.WState{W.WWatch{rv}, 0, True{}}, W.Watcher.init_out(first, W.Watcher.page_outs(items, [W.OInitDone{}])), False{}} : W.Step} LAWS.first_page_inits (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=first_page_inits) # The first page of a relist opens it with Init. law first_page_inits: for items: List<&2, J.Json> {W.Watcher.init_out(True{}, W.Watcher.page_outs(items, Nil{})) == W.OInit{} <> W.Watcher.page_outs(items, Nil{}) : List<&2, W.Out>} LAWS.watch_backoff_capped (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=watch_backoff_capped) # The watcher's backoff never exceeds 30s, however many failures. law watch_backoff_capped: {W.Backoff.delay(6) == 30000 : U32} LAWS.init_clears_buffer (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=init_clears_buffer) # A relist starts from an empty buffer, whatever the store held. law init_clears_buffer: for objs: Map<&2, J.Json> for buf: Map<&2, J.Json> for r: Bool {S.Store.apply(S.Store{objs, buf, r}, W.OInit{}) == S.Store{objs, Map.new(&2, J.Json), r} : S.Store} LAWS.init_done_swaps (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=init_done_swaps) # InitDone swaps the relisted buffer in whole: objects absent from the # relist leave the store, and the store is ready. law init_done_swaps: for objs: Map<&2, J.Json> for buf: Map<&2, J.Json> for r: Bool {S.Store.apply(S.Store{objs, buf, r}, W.OInitDone{}) == S.Store{buf, Map.new(&2, J.Json), True{}} : S.Store} LAWS.add_running_marks_dirty (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=add_running_marks_dirty) # Adding a key that is running does not queue it a second time: it is # marked dirty, to run again when the current run ends. law add_running_marks_dirty: for f: List<&2, String> for b: List<&2, String> for inq: Map<&2, U32> for run: Map<&2, U32> for d: Map<&2, U32> for g: Map<&2, U32> for fl: Map<&2, U32> for n: U32 … LAWS.add_waiting_dedups (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=add_waiting_dedups) # Adding a key that already waits changes nothing but its timer. law add_waiting_dedups: for f: List<&2, String> for b: List<&2, String> for inq: Map<&2, U32> for run: Map<&2, U32> for d: Map<&2, U32> for g: Map<&2, U32> for fl: Map<&2, U32> for n: U32 for mx: U32 … LAWS.pop_respects_limit (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=pop_respects_limit) # No key starts while every worker slot is taken. law pop_respects_limit: for f: List<&2, String> for b: List<&2, String> for inq: Map<&2, U32> for run: Map<&2, U32> for d: Map<&2, U32> for g: Map<&2, U32> for fl: Map<&2, U32> for n: U32 for mx: U32 … LAWS.retry_backoff_capped (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=retry_backoff_capped) # A failing key backs off for at most 1000s. law retry_backoff_capped: {Q.Queue.backoff(18) == 1000000 : U32} LAWS.done_idle_noop (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=done_idle_noop) # Finishing a key that is not running changes nothing and arms no timer. law done_idle_noop: for q: Q.Queue for key: String for a: Q.Action for idle: {Q.Queue.running(q, key) == False{} : Bool} {Q.Queue.done(q, key, a) == (q, Nil{}) : Q.Queue & List<&2, Q.Timer>} LAWS.forget_running_keeps (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=forget_running_keeps) # Forgetting never disturbs a key that is running. law forget_running_keeps: for q: Q.Queue for key: String for running: {Q.Queue.running(q, key) == True{} : Bool} {Q.Queue.forget(q, key) == q : Q.Queue} LAWS.fin_live_applies (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=fin_live_applies) # A live object that carries our finalizer is applied. law fin_live_applies: for fs: List<&2, String> for name: String for i: U32 {F.Fin.state.go(fs, name, Some{i}, False{}) == F.FApply{} : F.FState} LAWS.fin_gone_done (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=fin_gone_done) # A deleted object that no longer carries it needs nothing more. law fin_gone_done: for fs: List<&2, String> for name: String {F.Fin.state.go(fs, name, None{}, True{}) == F.FDone{} : F.FState} LAWS.fin_cleanup_tests (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=fin_cleanup_tests) # A deleted object that still carries it is cleaned up, and the finalizer # is removed only through a patch that tests it is still ours, at its index. law fin_cleanup_tests: for fs: List<&2, String> for name: String for i: U32 {F.Fin.state.go(fs, name, Some{i}, True{}) == F.FCleanup{F.Fin.remove_patch(i, name)} : F.FState} LAWS.eof_before_response_is_lost (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=eof_before_response_is_lost) # A connection that ends before any byte of a response is lost, not broken: # only then may a request on a reused connection be retried. law eof_before_response_is_lost: for t: U32 for h: Maybe<&2, H.Head> for o: List<&2, U32> {H.Http.eof(H.Resp{H.PHead{Nil{}, t}, h, o}) == H.Resp{H.PLost{"connection closed before a response"}, h, o} : H.Resp} LAWS.eof_mid_response_is_broken (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=eof_mid_response_is_broken) # Bytes of a response make an early end a broken response, never retried. law eof_mid_response_is_broken: for b: U32 for bs: List<&2, U32> for t: U32 for h: Maybe<&2, H.Head> for o: List<&2, U32> {H.Http.eof(H.Resp{H.PHead{b <> bs, t}, h, o}) == H.Resp{H.PErr{"connection closed mid-response"}, h, o} : H.Resp} LAWS.proxy_skips_localhost (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=proxy_skips_localhost) # localhost and loopback addresses never go through a proxy, whatever # HTTPS_PROXY and NO_PROXY say. law proxy_skips_localhost: for url: String for no: String for port: U32 {P.Proxy.route(url, no, "localhost", port) == P.Direct{} : P.Route} LAWS.proxy_skips_loopback (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=proxy_skips_loopback) law proxy_skips_loopback: for url: String for no: String for port: U32 {P.Proxy.route(url, no, "127.0.0.1", port) == P.Direct{} : P.Route} LAWS.no_proxy_star_bypasses (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=no_proxy_star_bypasses) # NO_PROXY=* sends every host around the proxy. law no_proxy_star_bypasses: for url: String for port: U32 {P.Proxy.route(url, "*", "api.example.com", port) == P.Direct{} : P.Route} LAWS.no_proxy_url_is_direct (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=no_proxy_url_is_direct) # Without HTTPS_PROXY, connections are direct. law no_proxy_url_is_direct: for port: U32 {P.Proxy.route("", "", "api.example.com", port) == P.Direct{} : P.Route} LAWS.unsupported_proxy_fails (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=unsupported_proxy_fails) # A proxy bend-kube cannot speak fails the connection: it never falls back # to connecting directly. law unsupported_proxy_fails: for port: U32 {P.Proxy.route("socks5://proxy:1080", "", "api.example.com", port) == P.NoRoute{"HTTPS_PROXY: only http:// proxies are supported"} : P.Route} LAWS.no_proxy_dot_is_subdomains_only (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=no_proxy_dot_is_subdomains_only) # ".corp" bypasses the subdomains of corp, not corp itself. law no_proxy_dot_is_subdomains_only: {P.Proxy.route("http://proxy:3128", ".corp", "corp", 443) == P.Via{P.Proxy{"proxy", 3128, ""}} : P.Route} LAWS.no_proxy_respects_labels (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=no_proxy_respects_labels) # "corp" bypasses corp and its subdomains, never a name that merely ends # in the same letters. law no_proxy_respects_labels: {P.Proxy.route("http://proxy:3128", "corp", "evilcorp", 443) == P.Via{P.Proxy{"proxy", 3128, ""}} : P.Route} LAWS.no_proxy_port_narrows (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=no_proxy_port_narrows) # An entry with a port bypasses only that port. law no_proxy_port_narrows: {P.Proxy.route("http://proxy:3128", "api.corp:6443", "api.corp", 443) == P.Via{P.Proxy{"proxy", 3128, ""}} : P.Route} LAWS.tunnel_needs_200 (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=tunnel_needs_200) # Only a 200 opens the tunnel; any other answer fails it, quoted. law tunnel_needs_200: {P.Tunnel.feed(P.Tunnel.init(), U.Utf8.encode("HTTP/1.1 407 Proxy Authentication Required\r\n\r\n")) == P.TFail{"proxy refused CONNECT: HTTP/1.1 407 Proxy Authentication Required"} : P.Tunnel} LAWS.tunnel_rejects_early_bytes (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=tunnel_rejects_early_bytes) # Bytes after the proxy's answer, before we spoke TLS, fail the tunnel: # nothing the proxy says may become part of the TLS stream. law tunnel_rejects_early_bytes: for b: U32 for bs: List<&2, U32> {P.Tunnel.feed(P.Tunnel.init(), List.append(&2, U32, U.Utf8.encode("HTTP/1.1 200 OK\r\n\r\n"), b <> bs)) == P.TFail{"proxy sent bytes before the TLS handshake"} : P.Tunnel} LAWS.tunnel_end_before_answer (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/LAWS.bend&name=tunnel_end_before_answer) # A proxy that hangs up before its answer is whole fails the tunnel. law tunnel_end_before_answer: for h: List<&2, U32> {P.Tunnel.feed(P.TMore{h}, Nil{}) == P.TFail{"proxy closed the connection before answering CONNECT"} : P.Tunnel} PROOF.Proof.pop_full (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/PROOF.bend&name=Proof.pop_full) # With no free slot, pop.go answers None whatever the front holds. def Proof.pop_full(f: List<&2, String>, b: List<&2, String>, inq: Map<&2, U32>, run: Map<&2, U32>, d: Map<&2, U32>, g: Map<&2, U32>, fl: Map<&2, U32>, n: U32, mx: U32) -> {Q.Queue.pop.go(f, b, inq, run, d, g, fl, n, mx, False{}) == (Q.Queue{f, b, inq, run, d, g, fl, n, mx}, None{}) : Q.Queue & Maybe<&2, String>}: PROOF.Proof.forget_busy (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/PROOF.bend&name=Proof.forget_busy) # A busy key leaves any queue as it is. def Proof.forget_busy(q: Q.Queue, key: String) -> {Q.Queue.forget.go(q, key, True{}) == q : Q.Queue}: Base64.B64 (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64) type B64 is Data: B64{acc: U32, bits: U32, ok: Bool} Base64.B64.val.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.val.go) def B64.val.go(+x: U32, up: Bool, low: Bool, dig: Bool) -> U32: Base64.B64.val (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.val) # The 6-bit value of a char: 64 for skipped chars, 65 for bad ones. def B64.val(+c: Char) -> U32: Base64.B64.next.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.next.go) def B64.next.go(+acc: U32, +bits: U32, ok: Bool, +v: U32, skip: Bool, bad: Bool, full: Bool) -> B64: Base64.B64.next (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.next) # The state after a char's value v. def B64.next(st: B64, +v: U32) -> B64: Base64.B64.emit.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.emit.go) def B64.emit.go(+acc: U32, +bits: U32, +v: U32, out: List<&2, U32>, skip: Bool, full: Bool) -> List<&2, U32>: Base64.B64.emit (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.emit) # The byte a char completes, pushed onto out (reversed). def B64.emit(st: B64, +v: U32, out: List<&2, U32>) -> List<&2, U32>: Base64.B64.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.go) def B64.go(s: String, +st: B64, out: List<&2, U32>) -> B64 & List<&2, U32>: Base64.B64.decode.fin (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.decode.fin) def B64.decode.fin(r: B64 & List<&2, U32>) -> Maybe<&2, List<&2, U32>>: Base64.B64.decode (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.decode) # The bytes a base64 text spells; None if a char is outside the alphabet. def B64.decode(s: String) -> Maybe<&2, List<&2, U32>>: Base64.B64.chr.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.chr.go) def B64.chr.go(+v: U32, up: Bool, low: Bool, dig: Bool, plus: Bool) -> Char: Base64.B64.chr (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.chr) def B64.chr(+v: U32) -> Char: Base64.B64.encode (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/base64.bend&name=B64.encode) # Encodes bytes, three at a time, with '=' padding. def B64.encode(bs: List<&2, U32>) -> String: Client.Res (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Res) def Res(-A: Type) -> Type: Client.KErr (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=KErr) type KErr is Data: KNet{code: U32, msg: String} KApi{status: C.Status} KDecode{msg: String} Client.Reply (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Reply) type Reply is Data: Reply{status: U32, body: String} Client.KErr.show (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=KErr.show) def KErr.show(e: KErr) -> String: Client.KErr.retryable (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=KErr.retryable) # Whether a failed call is worth retrying: the network, 429 (API priority # and fairness), and 5xx. 4xx answers are final. def KErr.retryable(e: KErr) -> Bool: Client.KErr.code (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=KErr.code) def KErr.code(e: KErr) -> U32: Client.Fs.close_with (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Fs.close_with) def Fs.close_with(-A: Type, f: File, r: Res(A)) -> IO(Res(A)): Client.Fs.read.got (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Fs.read.got) def Fs.read.got(p: File & Res(List<&2, U32>)) -> IO(Res(String)): Client.Fs.read.sized.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Fs.read.sized.go) def Fs.read.sized.go(f: File, +n: U32, empty: Bool) -> IO(Res(String)): Client.Fs.read.sized (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Fs.read.sized) def Fs.read.sized(p: File & Res(U32)) -> IO(Res(String)): Client.Fs.read.opened (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Fs.read.opened) def Fs.read.opened(r: Res(File)) -> IO(Res(String)): Client.Fs.read (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Fs.read) # A whole file as UTF-8 text. def Fs.read(path: String) -> IO(Res(String)): Client.Src.load.fin (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Src.load.fin) def Src.load.fin(+path: String, r: Res(String)) -> IO(Res(String)): Client.Strs.own (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Strs.own) def Strs.own(xs: List<&2, String>) -> List: Client.Exec.token.got (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Exec.token.got) def Exec.token.got(+cmd: String, t: J.Json) -> Res(String): Client.Exec.token.json (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Exec.token.json) def Exec.token.json(+cmd: String, j: Result<&2, &2, String, J.Json>) -> Res(String): Client.Exec.token (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Exec.token) # A credential plugin's answer (client-go's exec ExecCredential): its # status.token. The plugin runs on every connection, so it may cache and # refresh tokens as it sees fit. def Exec.token(+cmd: String, r: Res(U32 & (String & String))) -> IO(Res(String)): Client.Src.load (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Src.load) def Src.load(s: K.Src) -> IO(Res(String)): Client.Creds (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Creds) type Creds is Data: Creds{ca: String, cert: String, key: String, token: String} Client.Creds.load.k (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Creds.load.k) def Creds.load.k(ca: String, cert: String, key: String, tok: Res(String)) -> IO(Res(Creds)): Client.Creds.load.c (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Creds.load.c) def Creds.load.c(ca: String, cert: String, key: Res(String), tok: K.Src) -> IO(Res(Creds)): Client.Creds.load.b (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Creds.load.b) def Creds.load.b(ca: String, cert: Res(String), key: K.Src, tok: K.Src) -> IO(Res(Creds)): Client.Creds.load.a (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Creds.load.a) def Creds.load.a(ca: Res(String), cert: K.Src, key: K.Src, tok: K.Src) -> IO(Res(Creds)): Client.Creds.load (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Creds.load) # Reads every secret a Config names; token files are read afresh each time. def Creds.load(c: K.Config) -> IO(Res(Creds)): Client.Conn.auth.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.auth.go) def Conn.auth.go(token: String, none: Bool) -> List<&2, H.Header>: Client.Conn.auth (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.auth) def Conn.auth(+token: String) -> List<&2, H.Header>: Client.Conn.user_agent (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.user_agent) def Conn.user_agent() -> String: Client.Conn.keep (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.keep) def Conn.keep(keep: Bool) -> String: Client.Conn.connection (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.connection) def Conn.connection(keep: Bool, own: Bool) -> List<&2, H.Header>: Client.Conn.render (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.render) # The request's text, with the path under the server's base, our headers, # and Connection: keep-alive (pooled) or close, unless the request names # its own (an Upgrade). def Conn.render(req: H.Req, +base: String, +host: String, +token: String, keep: Bool) -> String: Client.Conn.host_header.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.host_header.go) def Conn.host_header.go(h: String, +p: U32, v6: Bool) -> String: Client.Conn.host_header (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.host_header) def Conn.host_header(+h: String, +p: U32) -> String: Client.Conn.open.sent (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.open.sent) # Opens a connection and sends req: the socket, ready to read the answer. def Conn.open.sent(p: Socket & Res(Unit)) -> IO(Res(N.Tls)): Client.Conn.open.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.open.go) def Conn.open.go(r: Res(Socket), text: String) -> IO(Res(N.Tls)): Client.Conn.open.creds (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.open.creds) def Conn.open.creds(+h: String, +p: U32, +base: String, req: H.Req, keep: Bool, cr: Res(Creds)) -> IO(Res(N.Tls)): Client.Conn.open (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.open) def Conn.open(+cfg: K.Config, req: H.Req, keep: Bool) -> IO(Res(N.Tls)): Client.ReadEv (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=ReadEv) # What the read loop just saw: bytes (or a failure) from a recv, or the # decoder's state after feeding them. type ReadEv is Type: RGot{sock: Socket, r: Result<&1, &1, U32 & String, List<&2, U32>>} RChk{sock: Socket, done: Bool, eof: Bool, bad: Bool} Client.ReadEv.got (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=ReadEv.got) def ReadEv.got(p: Socket & Res(List<&2, U32>)) -> ReadEv: Client.Http.has_err (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Http.has_err) def Http.has_err(r: H.Resp) -> Bool: Client.Http.fail (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Http.fail) def Http.fail(msg: String) -> H.Resp: Client.Http.lost (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Http.lost) # A failed recv: lost when no byte of a response came, else broken. def Http.lost(r: H.Resp, msg: String) -> H.Resp: Client.Conn.read (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.read) # Reads until the response is whole, the stream ends, or fuel runs out; # ms bounds each recv. Answers the socket and the decoder. def Conn.read(fuel: Nat, ev: ReadEv, +resp: H.Resp, +ms: U32) -> IO(Socket & H.Resp): Client.Reply.of (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Reply.of) def Reply.of(r: H.Resp & List<&2, U32>) -> Result<&2, &2, KErr, Reply>: Client.Call.read.fin (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Call.read.fin) def Call.read.fin(p: Socket & H.Resp) -> IO(Result<&2, &2, KErr, Reply>): Client.Call.read (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Call.read) def Call.read(t: Res(N.Tls)) -> IO(Result<&2, &2, KErr, Reply>): Client.Conn.send_on.creds (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.send_on.creds) # Sends req on an open (pooled) connection. def Conn.send_on.creds(s: Socket, +h: String, +p: U32, +base: String, req: H.Req, cr: Res(Creds)) -> IO(Res(N.Tls)): Client.Conn.send_on (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Conn.send_on) def Conn.send_on(+cfg: K.Config, s: Socket, req: H.Req) -> IO(Res(N.Tls)): Client.Http.got_any (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Http.got_any) def Http.got_any(r: H.Resp) -> Bool: Client.Http.closes (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Http.closes) def Http.closes(r: H.Resp) -> Bool: Client.Req.idempotent.go (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Req.idempotent.go) def Req.idempotent.go(m: String) -> Bool: Client.Req.idempotent (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Req.idempotent) def Req.idempotent(r: H.Req) -> Bool: Client.Pool.put.done (https://jend.leeeet.dev/definition.txt?path=bend-kube-runtime@0.2.0.0/src/client.bend&name=Pool.put.done) def Pool.put.done(p: Poll<&1, &1, Result<&1, &1, Socket, Unit>, Socket>) -> IO(Unit): More: https://jend.leeeet.dev/packages/bend-kube-runtime.txt?definitions_offset=100