openfeatureprovider

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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