Documentation
¶
Overview ¶
Package managercache says what the manager keeps in memory from the resources it watches.
A watch is a cache, and a cache holds whole objects. The schema controller watches ConfigMaps cluster-wide so a changed verification policy wakes the resources bound to it, and the only thing that wakes them is the ConfigMap's namespace and name. Everything else the watch would hold is cost: unrelated application configuration, and the ConfigMaps an Apply mounts its plan through, which carry up to eight mebibytes of SQL per plan.
The plan chunks themselves are their own kind, and the manager does not watch them at all.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientOptions ¶
ClientOptions keeps ConfigMap and plan chunk reads off the cache.
The transform is what bounds the memory; this is what keeps the bound honest. Every ConfigMap this operator reads for its content -- a verification policy, a source, a plan projection -- is read through the API reader, because each one is a decision that a cache may not be current enough to make. The one cached read goes to the cache itself rather than through this client: retiring source snapshots needs only their names and owners, which the transform keeps. Routing the cached client's reads to the API server as well means a read added later cannot quietly start seeing objects the transform emptied, and cannot quietly build a second informer that holds what the transform dropped.
A plan chunk is the same case without a watch: a cached read of one would start an informer over every chunk in the cluster, eight mebibytes of SQL per plan, the first time anything asked. The plan store reads chunks through the API reader, and so does anything that reads them through this client.
func StripConfigMapPayload ¶
StripConfigMapPayload drops what a ConfigMap carries and keeps what names it.
It is the cache's transform, so it runs on every object the watch delivers before it is stored, and on nothing the API reader returns. Managed fields go with the payload: they describe the fields that are no longer there, and on a plan chunk they are proportional to what was dropped.
Anything that is not a ConfigMap is returned untouched. A transform sees the deletion tombstones the informer emits as well as live objects, and turning one of those into an error would drop a delete event, which is how a policy that was removed goes on waking nothing.
Types ¶
This section is empty.