features

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All() []string

All returns enabled features as a slice of strings.

func Disable

func Disable(names ...string)

Disable removes all feature flags in a given slice from the current feature list.

func Enable

func Enable(names ...string)

Enable adds a given slice of feature names to the current feature list.

func IsEnabled

func IsEnabled(name string) bool

IsEnabled returns True if a specified flag is enabled.

func NewFeatureFlagSet

func NewFeatureFlagSet(flags ...string)

NewFeatureFlagSet initializes and populates a new FeatureFlagSet. This must be called to properly initialize the set for tracking flags. It is also useful for selectively controlling flags during tests.

func Serialize

func Serialize() string

Serialize returns all features as a comma-separated string.

Types

type PluginFinder added in v1.13.0

type PluginFinder interface {
	Find(kind common.PluginKind, name string) bool
}

type Verifier added in v1.13.0

type Verifier interface {
	Verify(name string) (bool, error)
}

func NewVerifier added in v1.13.0

func NewVerifier(finder PluginFinder) Verifier

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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