Documentation
¶
Overview ¶
Package component provides the shared registry that backs Wardyn's pluggable component seams (identity provider, secret store, recording store, policy evaluator, …). One generic implementation of name→constructor registration, default resolution, and duplicate detection, so every seam selects an implementation uniformly via a WARDYN_<SEAM> name while keeping a type-safe, seam-specific constructor signature.
Implementations self-register at init() time (like database/sql drivers): a blank import of an impl package makes it selectable. The registered default name maps to the current built-in, so an unset selector reproduces today's behavior exactly.
A registered implementation is not "blessed" until it passes its seam's RunConformance suite (see the per-seam *test packages) — registration makes an impl selectable; conformance makes it trustworthy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry[C any] struct { // contains filtered or unexported fields }
Registry is a name→constructor registry for one pluggable seam. C is the seam's constructor FUNC type (e.g. func(Deps) (Provider, error)), so each seam stays type-safe while sharing this implementation. Construct with NewRegistry.
func NewRegistry ¶
NewRegistry returns an empty registry whose default selection is def.
func (*Registry[C]) Lookup ¶
Lookup returns the constructor for name (an empty name resolves to the default) and whether it was found.
func (*Registry[C]) Names ¶
Names returns the registered names sorted (for /healthz and error messages).