Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSecreter ¶
func RegisterSecreter(reg SecreterRegistration)
func RegisteredSecreterNames ¶
func RegisteredSecreterNames() []string
Types ¶
type Secreter ¶
type Secreter interface {
// Returns the value and an opaque version, which is empty without change detection
Lookup(ctx context.Context, key string) (string, string, error)
// Versions match keys positionally. An empty version means the key can't be watched
Check(ctx context.Context, keys []string) ([]string, error)
}
Resolves secret references in configuration. Implementations holding resources may implement lifecycle.Closer
type SecreterDeps ¶ added in v0.11.0
type SecreterDeps struct {
ErrorMessages config.ErrorMessages
// Rebuilds the entity generation when a watched secret rotates. Nil disables watching
ReloadFunc func(reason string)
}
New dependencies are added as fields so the Initialize signature stays stable
type SecreterRegistration ¶
type SecreterRegistration interface {
Name() string
Initialize(config any, deps SecreterDeps) (Secreter, error)
InitializeConfig() any
// Max keys per Check call. 0 means the backend can't be watched
CheckBatchSize() int
}
func RegisteredSecreter ¶
func RegisteredSecreter(name string) (SecreterRegistration, bool)
Click to show internal directories.
Click to hide internal directories.