Documentation
¶
Index ¶
Constants ¶
View Source
const ( // FeatureACReservation store name for ACReservation feature FeatureACReservation = "ACReservation" // FeatureNodeIDFromAnnotation store name for NodeIDFromAnnotation feature FeatureNodeIDFromAnnotation = "NodeIDFromAnnotation" // FeatureExternalAnnotationForNode store name for ExternalAnnotationForNodeID feature FeatureExternalAnnotationForNode = "ExternalAnnotationForNode" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeatureChecker ¶
type FeatureChecker interface {
// IsEnabled check if features is enabled
IsEnabled(name string) bool
// List list all features
List() []string
}
FeatureChecker is a "read" interface for FeatureConfig
type FeatureConfig ¶
type FeatureConfig struct {
// contains filtered or unexported fields
}
FeatureConfig store features flags
func NewFeatureConfig ¶
func NewFeatureConfig() *FeatureConfig
NewFeatureConfig returns new instance of FeatureConfig
func (*FeatureConfig) IsEnabled ¶
func (f *FeatureConfig) IsEnabled(name string) bool
IsEnabled is implementation of FeatureChecker interface
func (*FeatureConfig) List ¶
func (f *FeatureConfig) List() []string
List is implementation of FeatureChecker interface
func (*FeatureConfig) Update ¶
func (f *FeatureConfig) Update(name string, enabled bool)
Update is implementation of FeatureConfigurator interface
type FeatureConfigurator ¶
type FeatureConfigurator interface {
FeatureChecker
// Update adds new feature or update existing
Update(name string, enabled bool)
}
FeatureConfigurator is a "write" interface for FeatureConfig
Click to show internal directories.
Click to hide internal directories.