Documentation
¶
Overview ¶
Package registry provides a generic, thread-safe provider registry for Diverge extension points. Each provider kind (router, deployer, database, notifier) instantiates its own Registry[T] to manage named provider factories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
// Client is the controller-runtime Kubernetes client.
Client client.Client
// Scheme is the runtime scheme with registered API types.
Scheme *runtime.Scheme
// Logger is a structured logger for the provider.
Logger logr.Logger
}
Deps holds the universal dependencies passed to provider factories.
type Provider ¶
type Provider[T any] struct { // Create constructs the provider from the given dependencies. Create func(deps Deps) (T, error) // Description is a one-line summary shown in --help output. Description string }
Provider describes a named provider factory.
type Registry ¶
type Registry[T any] struct { // contains filtered or unexported fields }
Registry is a thread-safe, named-factory store for a single provider kind.
func (*Registry[T]) Create ¶
Create looks up a provider by name and invokes its factory. Returns a descriptive error listing available providers if not found.
Click to show internal directories.
Click to hide internal directories.