Documentation
¶
Overview ¶
Package services holds the platform service pattern (ADR-0019): the single KindService reconciler (the Dispatcher) that routes each Service to the TypeHandler registered for its spec.type, plus the shared status write-back. A service type (KV, blob, secrets, …) contributes a TypeHandler — never its own Service reconciler — so they never collide on the gvk (ADR-0015 is one-reconciler-per-gvk). The facades live in per-type subpackages (internal/services/kv, …).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindingCache ¶ added in v0.3.0
type BindingCache[V comparable] struct { // contains filtered or unexported fields }
BindingCache is the TTL cache the per-type binding resolvers (kv, blob) keep of resolved bindings, keyed by (namespace, function, alias). Only resolved bindings are put: a miss is never cached, so default-deny stays live (ADR-0073).
func NewBindingCache ¶ added in v0.3.0
func NewBindingCache[V comparable](ttl time.Duration) *BindingCache[V]
NewBindingCache builds a BindingCache whose entries live for ttl.
func (*BindingCache[V]) Get ¶ added in v0.3.0
func (c *BindingCache[V]) Get(ns v1.NamespaceName, fn v1.ObjectName, alias string) (V, bool)
Get returns the live binding cached for (ns, fn, alias), dropping an expired one.
func (*BindingCache[V]) Len ¶ added in v0.3.0
func (c *BindingCache[V]) Len() int
Len is the number of entries held, expired ones included until a Get or a sweep drops them.
func (*BindingCache[V]) Put ¶ added in v0.3.0
func (c *BindingCache[V]) Put(ns v1.NamespaceName, fn v1.ObjectName, alias string, v V)
Put caches v for (ns, fn, alias) for the cache's ttl.
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher is the single controller.Reconciler for KindService: it routes by spec.type.
func NewDispatcher ¶
func NewDispatcher(st store.Store, logger *slog.Logger, handlers ...TypeHandler) (*Dispatcher, error)
NewDispatcher builds the Service dispatcher. Register it once on the engine for KindService. Handlers are keyed by their Type(); an unregistered type is a no-op.
func (*Dispatcher) Reconcile ¶
func (d *Dispatcher) Reconcile(ctx context.Context, req controller.Request) (controller.Result, error)
Reconcile reads the Service, routes it to its type's handler (no-op if unregistered), then writes Status.Phase=Ready on success (idempotent — the ADR-0015 contract).
type TypeHandler ¶
type TypeHandler interface {
Type() v1.ServiceType
Reconcile(ctx context.Context, svc *v1.Service) (controller.Result, error)
}
TypeHandler is the per-service-type reconcile logic. It provisions the instance / binding for one Service of its Type; the Dispatcher does the shared status write-back.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package blob is the blob storage service: the function-facing, binding-gated Facade (ADR-0127) over the blob.Bucket substrate, plus the blob services.TypeHandler the Service dispatcher routes type:blob to.
|
Package blob is the blob storage service: the function-facing, binding-gated Facade (ADR-0127) over the blob.Bucket substrate, plus the blob services.TypeHandler the Service dispatcher routes type:blob to. |
|
Package catalog is the CatalogService reconciler (ADR-0086 as reworked by ADR-0087, F48/F57): the ADR-0019 controller half of the DuckLake/DuckDB/Quack add-on provider.
|
Package catalog is the CatalogService reconciler (ADR-0086 as reworked by ADR-0087, F48/F57): the ADR-0019 controller half of the DuckLake/DuckDB/Quack add-on provider. |
|
Package identity is the controller for KindIdentity (ADR-0135, FEAT-0008/F100): a user-assigned managed identity whose reconciler issues a revocable SigV4 credential — a stable access key (IdentityAccessKey) plus a generated, rotatable secret written to an owned Secret.
|
Package identity is the controller for KindIdentity (ADR-0135, FEAT-0008/F100): a user-assigned managed identity whose reconciler issues a revocable SigV4 credential — a stable access key (IdentityAccessKey) plus a generated, rotatable secret written to an owned Secret. |
|
Package kv is the KV service (ADR-0019/0072/0073): the function-facing Facade (binding-gated, <ns>/<store>/<table>/<key> prefixed, results prefix-stripped) over the kvstore.KV port, plus the KV services.TypeHandler the Service dispatcher routes type:kv to, and the KindKVStore reconciler.
|
Package kv is the KV service (ADR-0019/0072/0073): the function-facing Facade (binding-gated, <ns>/<store>/<table>/<key> prefixed, results prefix-stripped) over the kvstore.KV port, plus the KV services.TypeHandler the Service dispatcher routes type:kv to, and the KindKVStore reconciler. |
|
Package roles wires the ADR-0136 RolesAssignment model to the Cedar PDP: a store-backed WriterLister that feeds the generalized single-writer forbid's `writers` set, and a compile helper that turns RolesAssignments into the synthetic read/query/invoke permits the PolicySource aggregates.
|
Package roles wires the ADR-0136 RolesAssignment model to the Cedar PDP: a store-backed WriterLister that feeds the generalized single-writer forbid's `writers` set, and a compile helper that turns RolesAssignments into the synthetic read/query/invoke permits the PolicySource aggregates. |