Documentation
¶
Overview ¶
Package openfeatureprovider is a plugin registry for OpenFeature providers. Each provider (flagd, unleash, etc.) lives in its own subpackage, defines its own config struct, and self-registers a Constructor via init() - see the unleash subpackage for the reference implementation. Binaries opt into a provider with a blank import (e.g. cmd/server/main.go), same convention as common/asyncworkflow/queue/provider and common/archiver/provider.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, constructor Constructor) error
Register registers a named OpenFeature provider constructor. Intended to be called from a provider's own package init(), e.g. common/dynamicconfig/openfeatureprovider/unleash.
Types ¶
type Constructor ¶
type Constructor func(cfg Decoder) (openfeature.FeatureProvider, error)
Constructor builds an OpenFeature provider from its own config, decoded via cfg.
func Get ¶
func Get(name string) (Constructor, bool)
Get returns the constructor registered for name, if any.