Documentation ¶
Index ¶
- Constants
- func Providers() []string
- func Register(name string, provider Provider)
- type APIProvider
- type ControllerProvider
- type DelegateProvider
- func (p *DelegateProvider) AfterCreate(machine *platform.Machine) error
- func (p *DelegateProvider) Name() string
- func (p *DelegateProvider) NeedUpdate(old, new *platformv1.Machine) bool
- func (p *DelegateProvider) OnCreate(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error
- func (p *DelegateProvider) OnDelete(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error
- func (p *DelegateProvider) OnHealthCheck(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) *platformv1.Machine
- func (p *DelegateProvider) OnUpdate(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error
- func (p *DelegateProvider) PreCreate(machine *platform.Machine) error
- func (p *DelegateProvider) Validate(machine *platform.Machine) field.ErrorList
- func (p *DelegateProvider) ValidateUpdate(machine *platform.Machine, oldMachine *platform.Machine) field.ErrorList
- type Handler
- type Provider
Constants ¶
View Source
const ( ReasonWaiting = "Waiting" ReasonSkip = "Skip" ReasonFailedInit = "FailedInit" ReasonFailedUpdate = "FailedUpdate" ReasonFailedDelete = "FailedDelete" ConditionTypeDone = "EnsureDone" ConditionTypeHealthCheck = "HealthCheck" FailedHealthCheckReason = "FailedHealthCheck" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIProvider ¶ added in v1.8.0
type ControllerProvider ¶ added in v1.8.0
type ControllerProvider interface { // NeedUpdate could be implemented by user to judge whether machine need update or not. NeedUpdate(old, new *platformv1.Machine) bool 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 // OnHealthCheck could be implemented by user, and default implementation is checking // tenant cluster node status by machine IP OnHealthCheck(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) *platformv1.Machine }
ControllerProvider ControllerProvider
type DelegateProvider ¶ added in v1.3.1
type DelegateProvider struct { ProviderName string ValidateFunc func(machine *platform.Machine) field.ErrorList ValidateUpdateFunc func(machine *platform.Machine, oldMachine *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) NeedUpdate ¶ added in v1.8.0
func (p *DelegateProvider) NeedUpdate(old, new *platformv1.Machine) bool
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) OnHealthCheck ¶ added in v1.9.1
func (p *DelegateProvider) OnHealthCheck(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) *platformv1.Machine
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
func (*DelegateProvider) ValidateUpdate ¶ added in v1.9.0
type Provider ¶
type Provider interface { Name() string APIProvider ControllerProvider }
Provider defines a set of response interfaces for specific machine types in machine management.
func GetProvider ¶
GetProvider returns provider by name
Click to show internal directories.
Click to hide internal directories.