Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Apply = GetRegistry().Apply
Deprecated: [v0.50.0] Use GetRegistry().Apply.
var IsEnabled = GetRegistry().IsEnabled
Deprecated: [v0.50.0] Use GetRegistry().IsEnabled.
var List = GetRegistry().List
Deprecated: [v0.50.0] Use GetRegistry().List.
var Register = GetRegistry().MustRegister
Deprecated: [v0.50.0] Use GetRegistry().MustRegister.
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.
func (*Registry) IsEnabled ¶ added in v0.50.0
IsEnabled returns true if a registered feature gate is enabled and false otherwise.
func (*Registry) MustRegister ¶ added in v0.50.0
MustRegister like Register but panics if a Gate with the same ID is already registered.