Documentation
¶
Index ¶
- Constants
- func ClusterFeatures(fs []meta.FeatureGate) []meta.Feature
- func FeatureLogs() [][]FeatureLog
- func Reloadable(c meta.Component, update, current []meta.Feature) bool
- type FeatureLog
- type Gates
- func NewFromCluster(fs []meta.FeatureGate) Gates
- func NewFromClusterWithDefaults(fs []meta.FeatureGate, defaults Gates) Gates
- func NewFromClusterWithHash(fs []meta.FeatureGate, hash string) (Gates, error)
- func NewFromFeatures(fs []meta.Feature) Gates
- func NewFromHash(hash string) (Gates, error)
- func NewFromLogs(definitions []FeatureLog) Gates
- func NewFromObject[S scope.Object[F, T], F client.Object, T runtime.Object](obj F) Gates
Constants ¶
const CurrentFeatureGateDefinitionHash = "sha256:7f739c68838babaf882fb52819d0093f1478e11ce49da6b3a6592c078b92944d"
Variables ¶
This section is empty.
Functions ¶
func ClusterFeatures ¶
func ClusterFeatures(fs []meta.FeatureGate) []meta.Feature
ClusterFeatures returns the effective list to propagate to Groups/Instances. Explicit entries retain spec order; default-only entries follow log order.
func FeatureLogs ¶
func FeatureLogs() [][]FeatureLog
FeatureLogs returns a copy of the complete history, indexed by revision.
Types ¶
type FeatureLog ¶
type FeatureLog struct {
Name meta.Feature `json:"name"`
Stage meta.FeatureStage `json:"stage"`
Default bool `json:"default"`
}
FeatureLog describes a feature at a particular revision.
func DefinitionsAt ¶
func DefinitionsAt(hash string) ([]FeatureLog, error)
DefinitionsAt returns a copy of the definitions referenced by hash. Unknown hashes are never interpreted as the current definitions.
type Gates ¶
func NewFromCluster ¶
func NewFromCluster(fs []meta.FeatureGate) Gates
NewFromCluster applies Cluster spec overrides over the current default gates. An omitted Enabled means true; an omitted feature uses its default.
func NewFromClusterWithDefaults ¶
func NewFromClusterWithDefaults(fs []meta.FeatureGate, defaults Gates) Gates
NewFromClusterWithDefaults applies Cluster spec overrides over the supplied default gates.
func NewFromClusterWithHash ¶
func NewFromClusterWithHash(fs []meta.FeatureGate, hash string) (Gates, error)
NewFromClusterWithHash applies Cluster spec overrides over historical defaults.
func NewFromFeatures ¶
NewFromFeatures builds Group/Instance gates from their complete feature list. It never consults default gates; an absent feature is disabled.
func NewFromHash ¶
NewFromHash reconstructs the default gates at hash. Unknown hashes, including an empty hash, return an error.
func NewFromLogs ¶
func NewFromLogs(definitions []FeatureLog) Gates
NewFromLogs constructs default gates from a complete feature log snapshot.