config

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: 1 Imported by: 0

Documentation

Overview

Package config holds only the YAML-decodable Config for the OpenFeature-backed dynamicconfig.Client, so common/config can embed it directly. Deliberately kept free of any OpenFeature SDK import: github.com/open-feature/go-sdk/openfeature starts a background goroutine unconditionally from its own package init() the moment anything imports it, whether or not a provider is ever configured. common/config is imported by nearly every binary and test package in this repo, so if it pulled that SDK in transitively, every one of them would carry that goroutine permanently - breaking any test using goleak.VerifyNone. The actual client implementation (openfeatureclient.NewOpenFeatureClient et al., which does need the SDK) lives in the parent common/dynamicconfig/openfeatureclient package instead, imported only by dynamicconfigfx.New.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProviderName string     `yaml:"providerName"`
	Provider     *yaml.Node `yaml:"provider"`
}

Config configures the dynamicconfig.Client backed by OpenFeature. ProviderName selects a provider plugin self-registered under common/dynamicconfig/openfeatureprovider/<name> (blank-imported by the binary that wants it, e.g. cmd/server/main.go). Provider holds that plugin's own config shape, decoded lazily via yaml.Node so this package - and common/config, which embeds this struct directly - never import any provider-specific config type.

Jump to

Keyboard shortcuts

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