Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
EtcdFeatureProviders = make(map[string]FeatureFactory)
)
Functions ¶
func ListFeatureProvider ¶
func ListFeatureProvider() []string
ListFeatureProvider lists all feature provider
func RegisterFeatureFactory ¶
func RegisterFeatureFactory(name string, factory FeatureFactory)
RegisterFeatureFactory registers the specified feature provider
Types ¶
type Feature ¶
type Feature interface { // Equal checks whether the feature needs to be updated Equal(cluster *v1alpha2.EtcdCluster) bool // Sync synchronizes the latest feature configuration Sync(cluster *v1alpha2.EtcdCluster) error // Do executes inspection tasks. Do(task *v1alpha2.EtcdInspection) error }
Feature is an abstract, pluggable interface for cluster features.
func GetFeatureProvider ¶
func GetFeatureProvider(name string, ctx *FeatureContext) (Feature, error)
GetFeatureProvider gets the specified feature provider
type FeatureContext ¶
type FeatureContext struct { ClientBuilder util.ClientBuilder ClientConfigGetter etcd.ClientConfigGetter }
type FeatureFactory ¶
type FeatureFactory func(cfg *FeatureContext) (Feature, error)
Click to show internal directories.
Click to hide internal directories.