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) 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
- type Handler
- type Provider
Constants ¶
View Source
const ( ReasonWaiting = "Waiting" ReasonSkip = "Skip" ReasonFailedInit = "FailedInit" ReasonFailedUpdate = "FailedUpdate" ReasonFailedDelete = "FailedDelete" ConditionTypeDone = "EnsureDone" )
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 }
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) 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) OnUpdate ¶ added in v1.3.1
func (p *DelegateProvider) OnUpdate(ctx context.Context, machine *platformv1.Machine, cluster *typesv1.Cluster) error
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.