Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FlagValue ¶ added in v0.40.0
FlagValue implements the flag.Value interface and provides a mechanism for applying feature gate statuses to a Registry
type Gate ¶
Gate represents an individual feature that may be enabled or disabled based on the lifecycle state of the feature and CLI flags specified by the user.
type Registry ¶ added in v0.50.0
type Registry struct {
// contains filtered or unexported fields
}
func GetRegistry ¶ added in v0.50.0
func GetRegistry() *Registry
GetRegistry returns the global Registry.
func NewRegistry ¶ added in v0.50.0
func NewRegistry() *Registry
NewRegistry returns a new empty Registry.
func (*Registry) Apply ¶ added in v0.50.0
Apply a configuration in the form of a map of Gate identifiers to boolean values. Sets only those values provided in the map, other gate values are not changed. Deprecated: [v0.56.0] Use MustApply instead.
func (*Registry) IsEnabled ¶ added in v0.50.0
IsEnabled returns true if a registered feature gate is enabled and false otherwise.
func (*Registry) MustApply ¶ added in v0.56.0
MustApply a configuration in the form of a map of Gate identifiers to boolean values. Sets only those values provided in the map, other gate values are not changed.
func (*Registry) MustRegister ¶ added in v0.50.0
MustRegister like Register but panics if a Gate with the same ID is already registered.