openfeatureprovider

package
v1.4.2-prerelease03 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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.

type Decoder

type Decoder interface {
	Decode(out any) error
}

Decoder decodes a provider's own configuration. *yaml.Node (from common/config/yaml) satisfies this structurally, so this package never needs to import common/config.

Directories

Path Synopsis
unleash module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL