Documentation ¶
Overview ¶
Package featuregateclient provides methods to interact with Feature and FeatureGate resources
Index ¶
- func FeatureRefFromGateList(gates *corev1alpha2.FeatureGateList, featureName string) (string, corev1alpha2.FeatureReference)
- type ErrType
- type FeatureGateClient
- func (f *FeatureGateClient) ActivateFeature(ctx context.Context, featureName string, warrantyVoidAllowed bool) error
- func (f *FeatureGateClient) DeactivateFeature(ctx context.Context, featureName string) (string, error)
- func (f *FeatureGateClient) GetFeature(ctx context.Context, featureName string) (*corev1alpha2.Feature, error)
- func (f *FeatureGateClient) GetFeatureGate(ctx context.Context, featureGateName string) (*corev1alpha2.FeatureGate, error)
- func (f *FeatureGateClient) GetFeatureGateList(ctx context.Context) (*corev1alpha2.FeatureGateList, error)
- func (f *FeatureGateClient) GetFeatureList(ctx context.Context) (*corev1alpha2.FeatureList, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FeatureRefFromGateList ¶
func FeatureRefFromGateList(gates *corev1alpha2.FeatureGateList, featureName string) (string, corev1alpha2.FeatureReference)
FeatureRefFromGateList finds the requested Feature from a list of featuregates. If found, the name of the FeatureGate and the FeatureReference is returned.
Types ¶
type ErrType ¶
type ErrType string
ErrType is a machine readable value created for facilitating error-matching in tests.
type FeatureGateClient ¶
type FeatureGateClient struct {
// contains filtered or unexported fields
}
FeatureGateClient defines methods to interact with FeatureGate resources
func NewFeatureGateClient ¶
func NewFeatureGateClient(options ...Option) (*FeatureGateClient, error)
NewFeatureGateClient returns an instance of FeatureGateClient.
func (*FeatureGateClient) ActivateFeature ¶
func (f *FeatureGateClient) ActivateFeature(ctx context.Context, featureName string, warrantyVoidAllowed bool) error
ActivateFeature activates a Feature if it passes validation and warranty checks. Warning: Before sending `true` via the warrantyVoidAllowed function argument, ensure explicit user awareness and approval if activating a Feature will cause the support warranty to be void. Once warranty is void, it is is permanent for the environment.
func (*FeatureGateClient) DeactivateFeature ¶
func (f *FeatureGateClient) DeactivateFeature(ctx context.Context, featureName string) (string, error)
DeactivateFeature deactivates a Feature. Along with the error, it returns the name of the FeatureGate that gates the Feature.
func (*FeatureGateClient) GetFeature ¶
func (f *FeatureGateClient) GetFeature(ctx context.Context, featureName string) (*corev1alpha2.Feature, error)
GetFeature fetches the specified Feature resource.
func (*FeatureGateClient) GetFeatureGate ¶
func (f *FeatureGateClient) GetFeatureGate(ctx context.Context, featureGateName string) (*corev1alpha2.FeatureGate, error)
GetFeatureGate fetches the specified FeatureGate resource.
func (*FeatureGateClient) GetFeatureGateList ¶
func (f *FeatureGateClient) GetFeatureGateList(ctx context.Context) (*corev1alpha2.FeatureGateList, error)
GetFeatureGateList fetches all featuregates on the cluster.
func (*FeatureGateClient) GetFeatureList ¶
func (f *FeatureGateClient) GetFeatureList(ctx context.Context) (*corev1alpha2.FeatureList, error)
GetFeatureList fetches all features on the cluster.
type Option ¶
type Option func(*FeatureGateClient) *FeatureGateClient
Option is FeatureGateClient Option definition
func WithClient ¶
WithClient function is for setting the passed in client when creating FeatureGateClient