cloudprovider

package
v1.20.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCloudProvider

func RegisterCloudProvider(name string, register RegisterFunc)

RegisterCloudProvider registers a cloudprovider.Factory by name. This is expected to happen during app startup.

Types

type CloudProvider

type CloudProvider interface {
	// GetName returns the cloud provider name.
	GetName() string

	// Update cluster health status.
	UpdateHealthStatus([]healthcheck.NodeInfo, []healthcheck.NodeInfo) error

	// Repair triggers the node repair process in the cloud.
	Repair([]healthcheck.NodeInfo) error

	// Enabled decides if the repair should be triggered.
	// It's recommended that the `Enabled()` function of the cloud provider doesn't allow to re-trigger when the repair
	// is in place, e.g. before the repair process is finished, `Enabled()` should return false so that we won't
	// re-trigger the repair process in the subsequent checks.
	// This function also provides the cluster admin the capability to disable the cluster auto healing on the fly.
	Enabled() bool
}

CloudProvider is an abstract, pluggable interface for cloud providers.

func GetCloudProvider

func GetCloudProvider(name string, config config.Config, client kubernetes.Interface) (CloudProvider, error)

GetCloudProvider creates an instance of the named cloud provider

type RegisterFunc

type RegisterFunc func(config config.Config, client kubernetes.Interface) (CloudProvider, error)

Directories

Path Synopsis
register package is introduced in order to avoid circle imports between openstack and cloudprovider packages.
register package is introduced in order to avoid circle imports between openstack and cloudprovider packages.

Jump to

Keyboard shortcuts

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