src/client.bend relies on unsafe/foreign
raw source on the hub · import bend-kube-runtime@0.5.4.0/src/client.bend as Client
10 imports
import Base import ./json.bend as J import ./utf8.bend as U import ./http.bend as H import ./core.bend as C import ./config.bend as K import ./net.bend as N import ./yaml.bend as Y import ./queue.bend as Q import ./lease.bend as E
Types
type KErr source · line 31 · raw
Data
KRetry: an API error that names a delay: the Status body's details.retryAfterSeconds, else the Retry-After header (seconds), as the API server sends with 429 and some 5xx answers.
KNet@code:U32 -> @msg:String -> KErr
KApi@status:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Status -> KErr
KRetry@status:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Status -> @secs:U32 -> KErr
KDecode@msg:String -> KErr
type Reply source · line 37 · raw
Data
Reply@status:U32 -> @body:String -> @retry:Maybe<&2, U32> -> Reply
type Creds source · line 212 · raw
Data
Creds@ca:String -> @cert:String -> @key:String -> @token:String -> Creds
type ReadEv source · line 335 · raw
Type
What the read loop just saw: bytes (or a failure) from a recv, or the decoder's state after feeding them.
RGot@sock:Socket -> @r:Result<&1, &1, Pair(U32, String), List<&2, U32>> -> ReadEv
RChk@sock:Socket -> @done:Bool -> @eof:Bool -> @bad:Bool -> ReadEv
type PEv source · line 497 · raw
Type
PTook@m:Poll<&1, &1, Maybe<&1, Socket>, Unit> -> PEv
PSent@reused:Bool -> @r:Result<&1, &1, Pair(U32, String), 0xab6da4e9d8da6541d5508a9052c594cb/src/net.Tls> -> PEv
PRead@reused:Bool -> @r:Pair(Socket, 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp) -> PEv
PFin@sock:Socket -> @resp:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp -> @keep:Bool -> @retry:Bool -> PEv
Definitions
def Res source · line 25 · raw
@-A:Type -> Type
def KErr.show source · line 40 · raw
@e:KErr -> String
def KErr.retryable source · line 53 · raw
@e:KErr -> Bool
Whether a failed call is worth retrying: the network, 429 (API priority and fairness), and 5xx. 4xx answers are final.
def KErr.code source · line 64 · raw
@e:KErr -> U32
def KErr.reason source · line 73 · raw
@e:KErr -> String
def KErr.retry_after source · line 83 · raw
@e:KErr -> Maybe<&2, U32>
The delay the server asked for, in seconds, if it named one.
def KErr.action.go source · line 90 · raw
@+e:KErr -> @m:Maybe<&2, U32> -> 0xab6da4e9d8da6541d5508a9052c594cb/src/queue.Action
def KErr.action source · line 101 · raw
@+e:KErr -> 0xab6da4e9d8da6541d5508a9052c594cb/src/queue.Action
What a reconcile answers after a failed call: retry after the delay the server named (a 429's Retry-After), from 1s (so a 0 cannot spin) to at most 1000s (the key backoff's own cap, so a bad value cannot park a key for weeks), else retry with the key's backoff.
def KErr.is_conflict source · line 106 · raw
@+e:KErr -> Bool
A write lost to a newer resourceVersion (409 Conflict): read again and retry (client-go's retry.RetryOnConflict case).
def KErr.is_not_found source · line 109 · raw
@+e:KErr -> Bool
def KErr.is_already_exists source · line 112 · raw
@+e:KErr -> Bool
def KErr.is_throttled source · line 116 · raw
@+e:KErr -> Bool
The server is shedding load (429): back off before retrying.
def Fs.close_with source · line 122 · raw
@-A:Type -> @f:File -> @r:Res(A) -> IO(Res(A))
def Fs.read.got source · line 125 · raw
@p:Pair(File, Res(List<&2, U32>)) -> IO(Res(String))
def Fs.read.sized.go source · line 132 · raw
@f:File -> @+n:U32 -> @empty:Bool -> IO(Res(String))
def Fs.read.sized source · line 139 · raw
@p:Pair(File, Res(U32)) -> IO(Res(String))
def Fs.read.opened source · line 146 · raw
@r:Res(File) -> IO(Res(String))
def Fs.read source · line 154 · raw
@path:String -> IO(Res(String))
A whole file as UTF-8 text.
def Src.load.fin source · line 157 · raw
@+path:String -> @r:Res(String) -> IO(Res(String))
def Strs.own source · line 164 · raw
@xs:List<&2, String> -> List<&1, String>
def Exec.token.got source · line 171 · raw
@+cmd:String -> @t:0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json -> Res(String)
def Exec.token.json source · line 178 · raw
@+cmd:String -> @j:Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json> -> Res(String)
def Exec.token source · line 188 · raw
@+cmd:String -> @r:Res(Pair(U32, Pair(String, String))) -> IO(Res(String))
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 Src.load source · line 197 · raw
@s:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Src -> IO(Res(String))
def Creds.load.k source · line 215 · raw
@ca:String -> @cert:String -> @key:String -> @tok:Res(String) -> IO(Res(Creds))
def Creds.load.c source · line 222 · raw
@ca:String -> @cert:String -> @key:Res(String) -> @tok:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Src -> IO(Res(Creds))
def Creds.load.b source · line 229 · raw
@ca:String -> @cert:Res(String) -> @key:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Src -> @tok:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Src -> IO(Res(Creds))
def Creds.load.a source · line 236 · raw
@ca:Res(String) -> @cert:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Src -> @key:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Src -> @tok:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Src -> IO(Res(Creds))
def Creds.load source · line 244 · raw
@c:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> IO(Res(Creds))
Reads every secret a Config names; token files are read afresh each time.
def Conn.auth.go source · line 249 · raw
@token:String -> @none:Bool -> List<&2, 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Header>
def Conn.auth source · line 259 · raw
@+token:String -> List<&2, 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Header>
def Conn.user_agent source · line 262 · raw
String
def Conn.keep source · line 265 · raw
@keep:Bool -> String
def Conn.connection source · line 272 · raw
@keep:Bool -> @own:Bool -> List<&2, 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Header>
def Conn.render source · line 282 · raw
@req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> @+base:String -> @+host:String -> @+token:String -> @keep:Bool -> String
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.host_header.go source · line 291 · raw
@h:String -> @+p:U32 -> @v6:Bool -> String
def Conn.host_header source · line 298 · raw
@+h:String -> @+p:U32 -> String
def Conn.open.sent source · line 302 · raw
@p:Pair(Socket, Res(Unit)) -> IO(Res(0xab6da4e9d8da6541d5508a9052c594cb/src/net.Tls))
Opens a connection and sends req: the socket, ready to read the answer.
def Conn.open.go source · line 309 · raw
@r:Res(Socket) -> @text:String -> IO(Res(0xab6da4e9d8da6541d5508a9052c594cb/src/net.Tls))
def Conn.open.creds source · line 316 · raw
@+h:String -> @+p:U32 -> @+sn:String -> @+base:String -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> @keep:Bool -> @cr:Res(Creds) -> IO(Res(0xab6da4e9d8da6541d5508a9052c594cb/src/net.Tls))
def Conn.open source · line 325 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> @keep:Bool -> IO(Res(0xab6da4e9d8da6541d5508a9052c594cb/src/net.Tls))
def ReadEv.got source · line 339 · raw
@p:Pair(Socket, Res(List<&2, U32>)) -> ReadEv
def Http.has_err source · line 344 · raw
@r:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp -> Bool
def Http.fail source · line 347 · raw
@msg:String -> 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp
def Http.lost source · line 351 · raw
@r:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp -> @msg:String -> 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp
A failed recv: lost when no byte of a response came, else broken.
def Conn.read source · line 360 · raw
@fuel:Nat -> @ev:ReadEv -> @+resp:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp -> @+ms:U32 -> IO(Pair(Socket, 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp))
Reads until the response is whole, the stream ends, or fuel runs out; ms bounds each recv. Answers the socket and the decoder.
def Reply.retry_after source · line 387 · raw
@m:Maybe<&2, String> -> Maybe<&2, U32>
A Retry-After header in seconds (the form the API server sends); an HTTP-date one is left to the usual backoff.
def Reply.of source · line 394 · raw
@r:Pair(0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp, List<&2, U32>) -> Result<&2, &2, KErr, Reply>
def Call.read.fin source · line 405 · raw
@p:Pair(Socket, 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp) -> IO(Result<&2, &2, KErr, Reply>)
def Call.read source · line 411 · raw
@t:Res(0xab6da4e9d8da6541d5508a9052c594cb/src/net.Tls) -> IO(Result<&2, &2, KErr, Reply>)
def Conn.send_on.creds source · line 431 · raw
@s:Socket -> @+h:String -> @+p:U32 -> @+base:String -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> @cr:Res(Creds) -> IO(Res(0xab6da4e9d8da6541d5508a9052c594cb/src/net.Tls))
Sends req on an open (pooled) connection.
def Conn.send_on source · line 441 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @s:Socket -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> IO(Res(0xab6da4e9d8da6541d5508a9052c594cb/src/net.Tls))
def Http.got_any source · line 446 · raw
@r:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp -> Bool
def Http.closes source · line 455 · raw
@r:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp -> Bool
def Req.idempotent.go source · line 463 · raw
@m:String -> Bool
def Req.idempotent source · line 478 · raw
@r:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> Bool
def Pool.put.done source · line 483 · raw
@p:Poll<&1, &1, Result<&1, &1, Socket, Unit>, Socket> -> IO(Unit)
def Pool.put source · line 493 · raw
@+pool:Chan(Socket) -> @s:Socket -> IO(Unit)
Returns a connection to the pool; a full pool closes it instead.
def PEv.read source · line 503 · raw
@+reused:Bool -> @p:Pair(Socket, 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp) -> PEv
def PEv.fin source · line 506 · raw
@+reused:Bool -> @idem:Bool -> @p:Pair(Socket, 0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp) -> PEv
def Pool.reply source · line 512 · raw
@r:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Resp -> Result<&2, &2, KErr, Reply>
def Pool.fail source · line 515 · raw
@msg:String -> IO(Result<&2, &2, KErr, Reply>)
def Pool.run source · line 519 · raw
@fuel:Nat -> @ev:PEv -> @+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @+pool:Chan(Socket) -> @+req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> IO(Result<&2, &2, KErr, Reply>)
One request through the pool (fuel bounds the retry).
def Client.send.with source · line 559 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> @pool:Maybe<&2, Chan(Socket)> -> IO(Result<&2, &2, KErr, Reply>)
def Limit.fill source · line 576 · raw
@n:Nat -> @+ch:Chan(Unit) -> IO(Unit)
def Limit.tick source · line 587 · raw
@+qps:U32 -> @+every:U32 -> @+burst:U32 -> @+carry:U32 -> Nat
A tick of every ms earns qps * every / 1000 tokens; the remainder (in thousandths of a token) carries to the next tick, so the rate is exact. A tick adds at most burst tokens: the rest would find the bucket full.
def Limit.carry source · line 590 · raw
@+qps:U32 -> @+every:U32 -> @+carry:U32 -> U32
def Limit.refill source · line 593 · raw
@outer:Nat -> @fuel:Nat -> @+ch:Chan(Unit) -> @+qps:U32 -> @+every:U32 -> @+burst:U32 -> @+carry:U32 -> IO(Unit)
def Limit.every source · line 606 · raw
@+qps:U32 -> U32
Ticks of 10ms, or longer for slow rates (one token a tick), at most 1s.
def Limit.start source · line 610 · raw
@+qps:U32 -> @+burst:U32 -> IO(Chan(Unit))
A full bucket of burst tokens, refilled at qps a second (qps above 0).
def Fence.check.late source · line 618 · raw
@late:Bool -> IO(Unit)
def Fence.check.at source · line 630 · raw
@f:Maybe<&1, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Fence> -> @+now:U32 -> IO(Unit)
The leadership fence: a reading of the lease's last renewal. Under leader election every controller request checks it, and a lease past its renew deadline exits the process before the request leaves: whatever delays the leader loop (a long computation on the shared event loop), no write goes out after a standby may have taken over.
def Fence.mono source · line 637 · raw
IO(U32)
def Fence.peek source · line 640 · raw
@p:Poll<&1, &1, Maybe<&1, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Fence>, Unit> -> @+ch:Chan(0xab6da4e9d8da6541d5508a9052c594cb/src/config.Fence) -> IO(Unit)
def Fence.check source · line 649 · raw
@m:Maybe<&2, Chan(0xab6da4e9d8da6541d5508a9052c594cb/src/config.Fence)> -> IO(Unit)
def Client.send.go source · line 656 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> IO(Result<&2, &2, KErr, Reply>)
def Client.send.gate source · line 660 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> @m:Maybe<&2, Chan(Unit)> -> IO(Result<&2, &2, KErr, Reply>)
def Client.send source · line 671 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> IO(Result<&2, &2, KErr, Reply>)
Sends a request and reads the whole reply, whatever its status, after taking a token when the config has a rate limit.
def Client.json.status.fix.go source · line 674 · raw
@+c:U32 -> @+k:U32 -> @r:String -> @m:String -> @zero:Bool -> 0xab6da4e9d8da6541d5508a9052c594cb/src/core.Status
def Client.json.status.fix source · line 682 · raw
@+c:U32 -> @s:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Status -> 0xab6da4e9d8da6541d5508a9052c594cb/src/core.Status
A Status without a code (some proxies) takes the HTTP status.
def Client.json.err source · line 687 · raw
@s:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Status -> @m:Maybe<&2, U32> -> KErr
def Client.json.or source · line 694 · raw
@m:Maybe<&2, U32> -> @h:Maybe<&2, U32> -> Maybe<&2, U32>
def Client.json.status source · line 703 · raw
@+c:U32 -> @j:Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json> -> @ok:Bool -> @h:Maybe<&2, U32> -> Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>
h: the Retry-After header; the Status body's details.retryAfterSeconds wins when both name a delay.
def Client.json.of source · line 717 · raw
@r:Result<&2, &2, KErr, Reply> -> Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>
A 2xx reply's body as JSON; any other status as the Status it carries.
def Client.json source · line 724 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @req:0xab6da4e9d8da6541d5508a9052c594cb/src/http.Req -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Client.get source · line 731 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Client.list source · line 734 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @lp:0xab6da4e9d8da6541d5508a9052c594cb/src/core.ListParams -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Client.create source · line 737 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @obj:0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Client.replace source · line 740 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> @obj:0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Client.delete source · line 744 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Client.delete_with source · line 748 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> @o:0xab6da4e9d8da6541d5508a9052c594cb/src/core.DeleteOpts -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
A delete with options: propagation, grace period, preconditions.
def Client.replace_status source · line 754 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> @obj:0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
Replaces the status subresource (a PUT carrying the object's resourceVersion, so a stale write fails with 409).
def Client.patch source · line 758 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> @p:0xab6da4e9d8da6541d5508a9052c594cb/src/core.PatchKind -> @body:0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Client.patch_status source · line 762 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> @p:0xab6da4e9d8da6541d5508a9052c594cb/src/core.PatchKind -> @body:0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Client.apply source · line 768 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> @manager:String -> @body:0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
Server-side apply, kube's recommended write: the server merges our fields under our manager name and tracks ownership.
def Client.apply_with source · line 775 · raw
@+cfg:0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config -> @a:0xab6da4e9d8da6541d5508a9052c594cb/src/core.Api -> @name:String -> @manager:String -> @force:Bool -> @body:0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json -> IO(Result<&2, &2, KErr, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
Server-side apply that only forces when asked: without force, a field another manager owns (an HPA's spec.replicas) fails with 409 Conflict rather than being taken over.
def Kc.rebased source · line 779 · raw
@r:Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json> -> @+path:String -> Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>
def Kc.parse source · line 791 · raw
@+t:String -> @+path:String -> @json:Bool -> Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>
Reads one kubeconfig, JSON or YAML (yaml.bend), with its relative paths made absolute against its own directory, as client-go does.
def Kc.read.got source · line 798 · raw
@r:Res(String) -> @+path:String -> Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>
def Kc.read source · line 805 · raw
@+path:String -> IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Kc.merge.got source · line 811 · raw
@acc:Maybe<&2, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json> -> @r:Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json> -> Maybe<&2, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>
Merges the files of a KUBECONFIG list in order; a file that does not exist is skipped, as client-go skips it.
def Kc.merge source · line 820 · raw
@ps:List<&2, String> -> @acc:Maybe<&2, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json> -> IO(Maybe<&2, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json>)
def Config.from_kubeconfig.got source · line 828 · raw
@r:Maybe<&2, 0xab6da4e9d8da6541d5508a9052c594cb/src/json.Json> -> @ctx:String -> Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>
def Config.from_kubeconfig source · line 837 · raw
@+path:String -> @ctx:String -> IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
A kubeconfig (one path, or a KUBECONFIG list "a:b") at a context ("" for its current one). JSON and YAML are both read natively.
def Config.in_cluster.ns source · line 842 · raw
@host:String -> @port:String -> @ns:Res(String) -> IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
def Config.in_cluster.port source · line 850 · raw
@host:String -> @port:Res(String) -> IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
def Config.in_cluster.host source · line 858 · raw
@host:Res(String) -> IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
def Config.in_cluster source · line 867 · raw
IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
The pod's own service account (client-go's InClusterConfig).
def Config.infer.home source · line 871 · raw
@r:Res(String) -> IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
def Config.infer.pod source · line 878 · raw
@r:Res(String) -> IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
def Config.infer.kc source · line 885 · raw
@r:Res(String) -> IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
def Config.infer source · line 895 · raw
IO(Result<&2, &2, String, 0xab6da4e9d8da6541d5508a9052c594cb/src/config.Config>)
As kube-rs's Config::infer: $KUBECONFIG when set, else the pod's service account when in a cluster, else ~/.kube/config.