featuretoggle

package
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const AddonsPlugAndPlayFeatureToggleIdentifier = "ADDONS_PLUG_AND_PLAY"

Variables

This section is empty.

Functions

func IsEnabled added in v1.8.2

func IsEnabled(featureToggleHandlerToCheck FeatureToggleHandler, addonOperatorObjInCluster addonsv1alpha1.AddonOperator) bool

func IsEnabledOnTestEnv added in v1.8.2

func IsEnabledOnTestEnv(featureToggleHandlerToCheck FeatureToggleHandler) bool

Types

type AddonsPlugAndPlayFeatureToggle added in v1.8.2

type AddonsPlugAndPlayFeatureToggle struct {
	FeatureToggleHandler
	Client                      client.Client
	SchemeToUpdate              *runtime.Scheme
	AddonReconcilerOptsToUpdate *[]addoncontroller.AddonReconcilerOptions
}

func (*AddonsPlugAndPlayFeatureToggle) Disable added in v1.8.2

func (*AddonsPlugAndPlayFeatureToggle) Enable added in v1.8.2

func (*AddonsPlugAndPlayFeatureToggle) GetFeatureToggleIdentifier added in v1.8.2

func (h *AddonsPlugAndPlayFeatureToggle) GetFeatureToggleIdentifier() string

func (*AddonsPlugAndPlayFeatureToggle) Name added in v1.8.2

func (*AddonsPlugAndPlayFeatureToggle) PostClusterCreationSetup added in v1.8.2

func (h *AddonsPlugAndPlayFeatureToggle) PostClusterCreationSetup(ctx context.Context, clusterCreated *dev.Cluster) error

func (*AddonsPlugAndPlayFeatureToggle) PostManagerSetupHandle added in v1.8.2

func (h *AddonsPlugAndPlayFeatureToggle) PostManagerSetupHandle(ctx context.Context, mgr manager.Manager) error

func (*AddonsPlugAndPlayFeatureToggle) PreClusterCreationSetup added in v1.8.2

func (h *AddonsPlugAndPlayFeatureToggle) PreClusterCreationSetup(ctx context.Context) error

func (*AddonsPlugAndPlayFeatureToggle) PreManagerSetupHandle added in v1.8.2

func (h *AddonsPlugAndPlayFeatureToggle) PreManagerSetupHandle(ctx context.Context) error

type FeatureToggleHandler

type FeatureToggleHandler interface {
	Name() string
	GetFeatureToggleIdentifier() string
	PreManagerSetupHandle(ctx context.Context) error
	PostManagerSetupHandle(ctx context.Context, mgr manager.Manager) error
	TestableFeatureToggleHandler
}

func GetAvailableFeatureToggles

func GetAvailableFeatureToggles(opts ...availableFeatureTogglesGetterOpts) []FeatureToggleHandler

type MonitoringStackFeatureToggle

type MonitoringStackFeatureToggle struct {
	FeatureToggleHandler
	Client                      client.Client
	SchemeToUpdate              *runtime.Scheme
	AddonReconcilerOptsToUpdate *[]addoncontroller.AddonReconcilerOptions
}

func (*MonitoringStackFeatureToggle) Disable

func (*MonitoringStackFeatureToggle) Enable

func (*MonitoringStackFeatureToggle) GetFeatureToggleIdentifier added in v1.8.2

func (m *MonitoringStackFeatureToggle) GetFeatureToggleIdentifier() string

func (*MonitoringStackFeatureToggle) Name

func (*MonitoringStackFeatureToggle) PostClusterCreationSetup

func (m *MonitoringStackFeatureToggle) PostClusterCreationSetup(ctx context.Context, clusterCreated *dev.Cluster) error

func (*MonitoringStackFeatureToggle) PostManagerSetupHandle

func (m *MonitoringStackFeatureToggle) PostManagerSetupHandle(ctx context.Context, mgr manager.Manager) error

func (*MonitoringStackFeatureToggle) PreClusterCreationSetup

func (m *MonitoringStackFeatureToggle) PreClusterCreationSetup(ctx context.Context) error

func (*MonitoringStackFeatureToggle) PreManagerSetupHandle

func (m *MonitoringStackFeatureToggle) PreManagerSetupHandle(ctx context.Context) error

type TestableFeatureToggleHandler

type TestableFeatureToggleHandler interface {
	PreClusterCreationSetup(ctx context.Context) error
	PostClusterCreationSetup(ctx context.Context, clusterCreated *dev.Cluster) error
	Enable(ctx context.Context) error
	Disable(ctx context.Context) error
}

to be used by tests / magefile to setup envs with / without feature toggles

type WithAddonReconcilerOptsToUpdate

type WithAddonReconcilerOptsToUpdate struct {
	AddonReconcilerOptsToUpdate *[]addoncontroller.AddonReconcilerOptions
}

type WithClient

type WithClient struct {
	client.Client
}

type WithSchemeToUpdate

type WithSchemeToUpdate struct {
	*runtime.Scheme
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL