config

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