featureprovider

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EtcdFeatureProviders = make(map[string]FeatureFactory)
)

Functions

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 *v1alpha1.EtcdCluster) bool

	// Sync synchronizes the latest feature configuration
	Sync(cluster *v1alpha1.EtcdCluster) error

	// Do executes inspection tasks.
	Do(task *v1alpha1.EtcdInspection) error
}

func GetFeatureProvider

func GetFeatureProvider(name string, ctx *FeatureContext) (Feature, error)

GetFeatureProvider gets the specified feature provider

type FeatureContext

type FeatureContext struct {
	Clientbuilder util.ClientBuilder
}

type FeatureFactory

type FeatureFactory func(cfg *FeatureContext) (Feature, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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