Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feature ¶
type Feature struct {
// contains filtered or unexported fields
}
Feature represents a named feature that corresponds to a feature gate
func NewFeature ¶
func NewFeature(name featuregate.Feature, opts ...FeatureOption) *Feature
NewFeature is a utility function for easily creating and configuring new Features.
type FeatureOption ¶
type FeatureOption func(*Feature)
FeatureOption is a function used to configure a Feature
func WithEnableForFeatureSets ¶
func WithEnableForFeatureSets(featureSets ...configv1.FeatureSet) FeatureOption
WithEnableForFeatureSets returns a FeatureOption to enable the Feature in the provided feature sets by default.
type FeatureSetAwareFeatures ¶
type FeatureSetAwareFeatures map[configv1.FeatureSet]*features
FeatureSetAwareFeatures is a collection of enabled/disabled features for a named feature set. Each feature set will contain the same features, but may have different states for each feature.
func NewFeatureSetAwareFeatures ¶
func NewFeatureSetAwareFeatures() FeatureSetAwareFeatures
NewFeatureSetAwareFeatures builds a new FeatureSetAwareFeatures object, setting the known feature sets to the fixed feature sets that exist within OpenShift. The fixed feature sets within OpenShift are DevPreviewNoUpgrade, TechPreviewNoUpgrade, and "" (Default).
func (FeatureSetAwareFeatures) AddFeature ¶
func (fsaf FeatureSetAwareFeatures) AddFeature(feature *Feature)
AddFeature adds a new feature to the FeatureSetAwareFeatures. The new feature is added to all known feature sets. Unless explicitly marked as enabled for the known feature set, the feature will be added to set of features that is automatically disabled for the feature set.
func (FeatureSetAwareFeatures) FeatureGatesForFeatureSet ¶
func (fsaf FeatureSetAwareFeatures) FeatureGatesForFeatureSet(featureSet configv1.FeatureSet) (featuregate.MutableFeatureGate, error)
FeatureGatesForFeatureSet returns the featuregate.MutableFeatureGate corresponding to the provided featureSet. If the provided featureSet is unknown, an error will be returned. If the provided featureSet is known, the featuregate.MutableFeatureGate will be returned where all features marked as enabled for the featureSet will be enabled by default and all other features will be disabled by default. If any errors are encountered during the process of building the feature gates for the feature set, an error will be returned.