Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FeatureGates ¶
type FeatureGates struct {
// contains filtered or unexported fields
}
FeatureGates is a helper to manage feature switches.
Controllers can set their supported features and then at runtime verify which ones are enabled/disabled.
Callers have to call BindFlags, and then call SupportedFeatures to set the supported features and their default values.
func (*FeatureGates) BindFlags ¶
func (o *FeatureGates) BindFlags(fs *pflag.FlagSet)
BindFlags will parse the given pflag.FlagSet and load feature gates accordingly.
func (*FeatureGates) SupportedFeatures ¶
func (o *FeatureGates) SupportedFeatures(features map[string]bool) error
SupportedFeatures sets the supported features and their default values.
func (*FeatureGates) WithLogger ¶
func (o *FeatureGates) WithLogger(l logr.Logger) *FeatureGates
WithLogger sets the logger to be used when loading supported features.
Click to show internal directories.
Click to hide internal directories.