~/bend-docscommunity

src/control.bend checks

raw source on the hub · import bend-kube-runtime@0.10.0.0/src/control.bend as Control

6 imports
import Base
import ./json.bend as J
import ./core.bend as C
import ./config.bend as K
import ./watcher.bend as W
import ./store.bend as S

Types

type Pred source · line 46 · raw

Data

type Rel source · line 116 · raw

Data

type Ent source · line 280 · raw

Data

A primary as an index holds it: its key and namespace.

type Ix source · line 286 · raw

Data

refs: name -> the primaries whose field names it; nss: namespace -> the primaries in it ("" for cluster-scoped ones); prim: the cache, for the other relations.

type Fold source · line 421 · raw

Data

A batch of outputs folded into a cache: the cache after them, the keys they trigger, and the keys deleted.

type Sec source · line 560 · raw

Data

A related watch: what to watch (and its label selector), and how its objects map to primaries.

type Spec source · line 568 · raw

Data

A controller (kube-runtime's Controller::new(..).owns(..).watches(..)): the primary with its label and field selectors, the predicates its changes pass, the related watches, how many reconciles run at once, and how long one may run (timeout ms, 0 for no limit).

type Mapped source · line 824 · raw

Data

A related object the controller's mapper (RMap) is to map: the related watch it came from (from 1) and the object, as JSON text.

type Split source · line 828 · raw

Data

A fold's keys, split: plain keys, and objects for the mapper.

type Meter source · line 851 · raw

Data

What a reconcile tells the meter: add n to a counter, set a gauge, or (the health server) ask for every series in the Prometheus text format. labels is the inside of the braces, as kind="x",phase="y" ("" for none).

type Ctx source · line 867 · raw

Data

cfg: the client config; idx: the controller's index (0 for a lone controller); store: the primary's cache; caches: each related watch's, in the order they were added (Ctx.cache(c, 1) is the first); fails: how many times in a row this key's reconcile has failed (0 after a success), so a reconcile can escalate or give up; meter: where the controller's own metrics go (Metrics.add, Metrics.set), None outside Kube.control; clusters: each watch's config, the primary's first (Ctx.cluster).

Definitions

def Pred.part.gen source · line 53 · raw

@+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @g:String -> @none:Bool -> String

The part of an object a predicate looks at.

def Pred.part source · line 60 · raw

@p:Pred -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> String

def Pred.print.go source · line 71 · raw

@ps:List<&2, Pred> -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> String

def Pred.deleting source · line 78 · raw

@d:Bool -> String

def Pred.print source · line 90 · raw

@ps:List<&2, Pred> -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> String

What the predicates see of an object, its uid, deletion and finalizers included: an object deleted and recreated under the same name (a new uid) always passes, whatever its generation; a finalizer added or removed (by this controller or another) always passes, so a controller that adds its finalizer and waits for the change is woken by it.

def Pred.changed source · line 94 · raw

@+ps:List<&2, Pred> -> @old:Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+new:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> Bool

def Pred.passes source · line 106 · raw

@ps:List<&2, Pred> -> @old:Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+new:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> Bool

Whether a change to the primary reconciles it: always without predicates; with them, when what they see differs from the cached object. The new object is compared as the cache holds it (S.Store.slim: no managedFields or last-applied annotation), so a kubectl apply that changes nothing else does not pass PAnnotations.

def Ref.names.any source · line 125 · raw

@xs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+name:String -> Bool

A field names the object: the string itself, or a list holding it.

def Ref.names source · line 134 · raw

@v:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+name:String -> Bool

def Rel.near source · line 145 · raw

@+p:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+ns:String -> Bool

A primary can relate to the object: one in the object's namespace, or any primary when either is cluster-scoped.

def Rel.ref.put source · line 149 · raw

@+p:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @hit:Bool -> @rest:List<&2, String> -> List<&2, String>

def Rel.refs source · line 156 · raw

@ps:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+path:List<&2, String> -> @+ns:String -> @+name:String -> List<&2, String>

def Rel.all source · line 165 · raw

@ps:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+ns:String -> List<&2, String>

def Rel.key.go source · line 174 · raw

@+ns:String -> @+name:String -> @namespaced:Bool -> String

The key of a primary named name, related to an object in namespace ns: in that namespace for a namespaced primary, by name alone otherwise.

def Rel.key source · line 181 · raw

@+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+ns:String -> @+name:String -> String

def Rel.label source · line 185 · raw

@m:Maybe<&2, String> -> @+ns:String -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> List<&2, String>

The primary a label names.

def Rel.annot source · line 192 · raw

@o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @key:String -> Maybe<&2, String>

def Rel.annotated.go source · line 195 · raw

@+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @ns:Maybe<&2, String> -> @name:Maybe<&2, String> -> @+own:String -> List<&2, String>

def Rel.annotated source · line 207 · raw

@+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+nk:String -> @+vk:String -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> List<&2, String>

The primary two annotations name: its namespace (the object's own when that annotation is missing) and its name (nothing without it).

def Mapped.mark source · line 213 · raw

String

An object for the controller's mapper (RMap) rides among a fold's keys behind this mark, which no key starts with; the runtime takes it out (Mapped.split) and maps it.

def Ref.group.go source · line 217 · raw

@ps:List<&2, String> -> String

The group of an apiVersion: "apps" of "apps/v1", "" of "v1".

def Ref.group source · line 224 · raw

@av:String -> String

def Ref.is_owner source · line 228 · raw

@+r:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> Bool

Whether an owner reference names the primary's kind, in its group.

def Rel.owner.put source · line 232 · raw

@+r:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+ns:String -> @hit:Bool -> @rest:List<&2, String> -> List<&2, String>

def Rel.owner.go source · line 240 · raw

@rs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+ns:String -> List<&2, String>

def Rel.owners source · line 249 · raw

@+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> List<&2, String>

The primaries an object's owner references name (kube-runtime's trigger_owners): the primary's kind in its API group.

def Rel.keys source · line 254 · raw

@r:Rel -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+prim:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> List<&2, String>

The primary keys a related object triggers; res is the primary's resource (its kind, group and scope).

def Ix.put.got source · line 289 · raw

@r:Pair(Map<&2, List<&2, Ent>>, List<&2, Ent>) -> @+k:String -> @+e:Ent -> Map<&2, List<&2, Ent>>

def Ix.put source · line 294 · raw

@+m:Map<&2, List<&2, Ent>> -> @+k:String -> @+e:Ent -> Map<&2, List<&2, Ent>>

def Ix.get.got source · line 297 · raw

@r:Pair(Map<&2, List<&2, Ent>>, List<&2, Ent>) -> List<&2, Ent>

def Ix.get source · line 302 · raw

@+m:Map<&2, List<&2, Ent>> -> @+k:String -> List<&2, Ent>

def Ix.names.strs source · line 306 · raw

@xs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> List<&2, String>

The names a field holds: the string itself, or each string of a list.

def Ix.names source · line 315 · raw

@v:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> List<&2, String>

def Ix.refs.names source · line 324 · raw

@ns:List<&2, String> -> @+e:Ent -> @+m:Map<&2, List<&2, Ent>> -> Map<&2, List<&2, Ent>>

def Ix.refs.go source · line 332 · raw

@ps:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+path:List<&2, String> -> @+m:Map<&2, List<&2, Ent>> -> Map<&2, List<&2, Ent>>

Built from the primaries in reverse, so each list is in cache order.

def Ix.nss.go source · line 340 · raw

@ps:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+m:Map<&2, List<&2, Ent>> -> Map<&2, List<&2, Ent>>

def Ix.of source · line 348 · raw

@r:Rel -> @+prim:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> Ix

The index a relation needs, over the primaries' cache.

def Ix.prim source · line 358 · raw

@ix:Ix -> 0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store

def Ix.near.put source · line 363 · raw

@+k:String -> @hit:Bool -> @rest:List<&2, String> -> List<&2, String>

def Ix.near source · line 371 · raw

@es:List<&2, Ent> -> @+ns:String -> List<&2, String>

The entries near namespace ns (Rel.near's rule), as keys.

def Ix.keys source · line 378 · raw

@es:List<&2, Ent> -> List<&2, String>

def Ix.every.go source · line 386 · raw

@ps:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> List<&2, String>

Every primary, in cache order.

def Ix.every source · line 396 · raw

@prim:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> List<&2, String>

RAll through the index: every primary for a cluster-scoped object; else those in its namespace, and cluster-scoped ones (the primaries are one resource, so only one of the two lists is ever non-empty).

def Ix.all.go source · line 399 · raw

@ix:Ix -> @+ns:String -> @cluster:Bool -> List<&2, String>

def Rel.keys.ix source · line 407 · raw

@r:Rel -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+ix:Ix -> List<&2, String>

The primary keys a related object triggers, through the batch's index.

def Fold.put source · line 424 · raw

@+key:String -> @hit:Bool -> @ks:List<&2, String> -> List<&2, String>

def Out.obj source · line 431 · raw

@o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json>

def Fold.prim.one source · line 442 · raw

@+ps:List<&2, Pred> -> @o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> @f:Fold -> Fold

def Fold.prim source · line 461 · raw

@+ps:List<&2, Pred> -> @outs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out> -> @f:Fold -> Fold

The primary's outputs: each applied or initially listed object reconciles when it passes the predicates, against the cache as it was before it. A deleted object, and one a relist no longer has, is gone: the queue forgets it.

def Fold.rel.keys source · line 468 · raw

@+r:Rel -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @m:Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+ix:Ix -> List<&2, String>

def Fold.rel.hit source · line 476 · raw

@+r:Rel -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> @+ix:Ix -> @+s:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> @ks:List<&2, String> -> @+x:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @hit:Bool -> Fold

def Out.is_delete source · line 487 · raw

@o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> Bool

def Fold.rel.with source · line 495 · raw

@+r:Rel -> @+ps:List<&2, Pred> -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> @+ix:Ix -> @+s:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> @ks:List<&2, String> -> @m:Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> Fold

A change triggers when it is a deletion or passes the watch's predicates.

def Fold.rel.dropped source · line 506 · raw

@+r:Rel -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @ds:List<&2, String> -> @+s:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> @+ix:Ix -> List<&2, String>

The primaries of related objects a relist drops (deleted while the watch was down), by their cached versions.

def Fold.rel.one.go source · line 515 · raw

@+r:Rel -> @+ps:List<&2, Pred> -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> @+ix:Ix -> @+s:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> @ks:List<&2, String> -> @done:Bool -> Fold

def Out.is_done source · line 524 · raw

@o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> Bool

def Fold.rel.one source · line 531 · raw

@+r:Rel -> @+ps:List<&2, Pred> -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @+o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> @+ix:Ix -> @f:Fold -> Fold

def Fold.rel.go source · line 539 · raw

@+r:Rel -> @+ps:List<&2, Pred> -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @outs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out> -> @+ix:Ix -> @f:Fold -> Fold

A related watch's outputs: every change that passes the watch's predicates (ps; Nil passes all) triggers the primaries its relation maps the object to, as cached before and as it is now.

def Fold.rel_where source · line 547 · raw

@+r:Rel -> @+ps:List<&2, Pred> -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @outs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out> -> @+prim:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> @f:Fold -> Fold

def Fold.rel source · line 552 · raw

@+r:Rel -> @+res:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res -> @outs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out> -> @+prim:0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store -> @f:Fold -> Fold

Fold.rel_where without predicates: every change triggers.

def Spec.of source · line 574 · raw

@primary:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Api -> Spec

A controller for primary: every change, no related watches, 8 at once, no timeout.

def Spec.label source · line 577 · raw

@s:Spec -> @l:String -> Spec

def Spec.field source · line 583 · raw

@s:Spec -> @f:String -> Spec

The primary's field selector (for example "metadata.name=x").

def Spec.filter source · line 588 · raw

@s:Spec -> @ps:List<&2, Pred> -> Spec

def Spec.max source · line 594 · raw

@s:Spec -> @n:U32 -> Spec

At least 1.

def Spec.timeout source · line 603 · raw

@s:Spec -> @ms:U32 -> Spec

A reconcile still running after ms is hung: the process logs it and exits (status 1), so the pod restarts, as a crash would. A reconcile in Bend cannot be cancelled, and freeing its key while it still runs would let the same key run twice.

def Spec.watches_where source · line 610 · raw

@s:Spec -> @a:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Api -> @label:String -> @field:String -> @r:Rel -> Spec

Adds a related watch with label and field selectors ("" for none); the n-th one added is cache n (Ctx.cache).

def Spec.watches source · line 615 · raw

@s:Spec -> @a:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Api -> @r:Rel -> Spec

def Spec.owns source · line 620 · raw

@s:Spec -> @a:0xc8d18670ba37041507e7f53cc7972ec6/src/core.Api -> Spec

Objects of a's kind that the primary owns (ownerReferences to the primary's kind and group).

def Spec.primary source · line 623 · raw

@s:Spec -> 0xc8d18670ba37041507e7f53cc7972ec6/src/core.Api

def Spec.res source · line 628 · raw

@s:Spec -> 0xc8d18670ba37041507e7f53cc7972ec6/src/core.Res

def Spec.kind source · line 633 · raw

@s:Spec -> String

def Spec.preds source · line 636 · raw

@s:Spec -> List<&2, Pred>

def Spec.secs source · line 641 · raw

@s:Spec -> List<&2, Sec>

def Spec.max_of source · line 646 · raw

@s:Spec -> U32

def Spec.label_of source · line 651 · raw

@s:Spec -> String

def Spec.field_of source · line 656 · raw

@s:Spec -> String

def Spec.timeout_of source · line 661 · raw

@s:Spec -> U32

def Sec.rel source · line 666 · raw

@s:Sec -> Rel

def Sec.drop source · line 671 · raw

@s:Sec -> List<&2, String>

def Secs.set_last source · line 676 · raw

@ss:List<&2, Sec> -> @+d:List<&2, String> -> List<&2, Sec>

def Spec.drop source · line 690 · raw

@s:Spec -> @fields:List<&2, String> -> Spec

Drops top-level fields (for example "data" and "stringData" of Secrets) from the objects of the related watch added last, before they are cached: a controller that only needs to know a referenced Secret changed then holds no Secret's data. Reconcile reads what it needs with Client.get.

def Secs.filter_last source · line 695 · raw

@ss:List<&2, Sec> -> @+ps:List<&2, Pred> -> List<&2, Sec>

def Secs.on_last source · line 704 · raw

@ss:List<&2, Sec> -> @+c:0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config -> List<&2, Sec>

def Spec.watch_filter source · line 720 · raw

@s:Spec -> @ps:List<&2, Pred> -> Spec

Filters the related watch added last (kube-runtime's predicate_filter on a watches() stream): a change to one of its objects triggers its primaries only when what the predicates see differs from the cached object (or nothing is cached). Deletions, relists that drop an object, a new uid, the start of a deletion and a change of finalizers always pass, as for the primary. With no predicates (the default), every change triggers.

def Spec.watch_on source · line 733 · raw

@s:Spec -> @c:0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config -> Spec

Runs the related watch added last against another cluster: c, not the controller's config. Its objects map to primaries as any related watch's do, and Ctx.cluster(ctx, n) hands the reconcile the same config. c keeps its rate limit (Kube.connect adds one) but not its connection pool: a pool holds connections to one server, so Kube.control gives each such config a pool of its own. Under leader election c also takes the controllers' leadership fence, so no request to any cluster outlives the lease.

def Spec.on source · line 741 · raw

@s:Spec -> @c:0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config -> Spec

Watches the primary on another cluster: c, not the controller's config (which still holds the lease and serves Ctx.cfg). Ctx.cluster(ctx, 0) is c, fenced as Spec.watch_on says.

def Spec.timeout_or source · line 748 · raw

@s:Spec -> @+ms:U32 -> Spec

The reconcile timeout, ms (0 for none) a spec without its own takes (Opts.with_timeout): a spec's own timeout wins.

def Spec.cluster_of source · line 755 · raw

@s:Spec -> Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config>

def Sec.preds source · line 760 · raw

@s:Sec -> List<&2, Pred>

def Sec.cluster source · line 765 · raw

@s:Sec -> Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config>

def Cluster.of source · line 772 · raw

@+main:0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config -> @m:Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config> -> 0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config

The config a watch runs against: the controllers' own (main), or another cluster's, under main's leadership fence.

def Cluster.secs source · line 779 · raw

@ss:List<&2, Sec> -> @+main:0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config -> List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config>

def Spec.clusters source · line 788 · raw

@s:Spec -> @+main:0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config -> List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config>

Every watch's config, the primary's first, then each related watch's in the order they were added.

def Out.trim.obj source · line 793 · raw

@fs:List<&2, String> -> @+x:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json

def Out.trim source · line 800 · raw

@+fs:List<&2, String> -> @o:0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out -> 0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out

def Out.trim_all source · line 812 · raw

@+fs:List<&2, String> -> @os:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out> -> List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/watcher.Out>

A related watch's outputs with its dropped fields removed.

def Split.put source · line 831 · raw

@+n:U32 -> @+k:String -> @marked:Bool -> @r:Split -> Split

def Mapped.split source · line 838 · raw

@ks:List<&2, String> -> @+n:U32 -> Split

def Ctx.cfg source · line 871 · raw

@c:Ctx -> 0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config

def Ctx.idx source · line 876 · raw

@c:Ctx -> U32

def Ctx.store source · line 881 · raw

@c:Ctx -> 0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store

def Ctx.with_fails source · line 886 · raw

@c:Ctx -> @n:U32 -> Ctx

def Ctx.meter source · line 891 · raw

@c:Ctx -> Maybe<&2, Chan(Meter)>

def Ctx.fails source · line 896 · raw

@c:Ctx -> U32

def Ctx.cluster source · line 904 · raw

@c:Ctx -> @n:U32 -> 0xc8d18670ba37041507e7f53cc7972ec6/src/config.Config

The config of watch n: 0 the primary's, n the n-th related watch's (as Ctx.cache counts); the controller's own (Ctx.cfg) unless the spec put the watch on another cluster (Spec.on, Spec.watch_on).

def Ctx.get source · line 910 · raw

@c:Ctx -> @key:String -> Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json>

The cached primary under a key ("ns/name", or "name").

def Ctx.list source · line 914 · raw

@c:Ctx -> List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json>

Every cached primary.

def Ctx.nth source · line 917 · raw

@cs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store> -> @n:Nat -> 0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store

def Ctx.cache source · line 927 · raw

@c:Ctx -> @n:U32 -> 0xc8d18670ba37041507e7f53cc7972ec6/src/store.Store

The cache of the n-th related watch (from 1); empty if there is none.

def Ctx.find source · line 933 · raw

@c:Ctx -> @n:U32 -> @key:String -> Maybe<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json>

A cached related object under a key.

def Ctx.all source · line 937 · raw

@c:Ctx -> @n:U32 -> List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json>

Every cached object of the n-th related watch.

def Owned.ctl source · line 940 · raw

@j:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> Bool

def Owned.uid.any source · line 947 · raw

@rs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+uid:String -> Bool

def Owned.by source · line 957 · raw

@+o:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @+uid:String -> Bool

Whether o's controller (the owner reference with controller: true) has this uid (metav1.IsControlledBy).

def Owned.keep source · line 960 · raw

@+x:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> @hit:Bool -> @rest:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json>

def Owned.pick source · line 967 · raw

@xs:List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json> -> @+uid:String -> List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json>

def Ctx.children source · line 976 · raw

@c:Ctx -> @n:U32 -> @+owner:0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json -> List<&2, 0xc8d18670ba37041507e7f53cc7972ec6/src/json.Json>

The cached objects of the n-th related watch that owner controls (by uid, with controller: true).