machine

package

Documentation

Index

Constants

View Source
const (
	ReasonWaiting      = "Waiting"
	ReasonSkip         = "Skip"
	ReasonFailedInit   = "FailedInit"
	ReasonFailedUpdate = "FailedUpdate"
	ReasonFailedDelete = "FailedDelete"

	ConditionTypeDone = "EnsureDone"
)

Variables

This section is empty.

Functions

func Providers

func Providers() []string

Providers returns a sorted list of the names of the registered providers.

func Register

func Register(name string, provider Provider)

Register makes a provider available by the provided name. If Register is called twice with the same name or if provider is nil, it panics.

Types

type DelegateProvider added in v1.3.1

type DelegateProvider struct {
	ProviderName string

	ValidateFunc    func(machine *platform.Machine) field.ErrorList
	PreCreateFunc   func(machine *platform.Machine) error
	AfterCreateFunc func(machine *platform.Machine) error

	CreateHandlers []Handler
	DeleteHandlers []Handler
	UpdateHandlers []Handler
}

func (*DelegateProvider) AfterCreate added in v1.3.1

func (p *DelegateProvider) AfterCreate(machine *platform.Machine) error

func (*DelegateProvider) Name added in v1.3.1

func (p *DelegateProvider) Name() string

func (*DelegateProvider) OnCreate added in v1.3.1

func (p *DelegateProvider) OnCreate(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error

func (*DelegateProvider) OnDelete added in v1.3.1

func (p *DelegateProvider) OnDelete(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error

func (*DelegateProvider) OnUpdate added in v1.3.1

func (p *DelegateProvider) OnUpdate(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error

func (*DelegateProvider) PreCreate added in v1.3.1

func (p *DelegateProvider) PreCreate(machine *platform.Machine) error

func (*DelegateProvider) Validate added in v1.3.1

func (p *DelegateProvider) Validate(machine *platform.Machine) field.ErrorList

type Handler added in v1.3.1

func (Handler) Name added in v1.3.1

func (h Handler) Name() string

type Provider

type Provider interface {
	Name() string

	Validate(machine *platform.Machine) field.ErrorList

	PreCreate(machine *platform.Machine) error
	AfterCreate(machine *platform.Machine) error

	OnCreate(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error
	OnUpdate(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error
	OnDelete(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error
}

Provider defines a set of response interfaces for specific machine types in machine management.

func GetProvider

func GetProvider(name string) (Provider, error)

GetProvider returns provider by name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL