Documentation ¶
Index ¶
- Constants
- func WaitForResult(name string, predicate func() (bool, interface{}, error), returnWhenError bool, ...) (interface{}, error)
- type Actuator
- func (a *Actuator) Create(ctx context.Context, machine *machinev1.Machine) error
- func (a *Actuator) Delete(ctx context.Context, machine *machinev1.Machine) error
- func (a *Actuator) Exists(ctx context.Context, machine *machinev1.Machine) (bool, error)
- func (a *Actuator) Update(ctx context.Context, machine *machinev1.Machine) error
- type ActuatorParams
- type Reconciler
- func (r *Reconciler) Create(ctx context.Context) error
- func (r *Reconciler) CreateMachine(ctx context.Context) (*ecs.Instance, error)
- func (r *Reconciler) Delete(ctx context.Context) error
- func (r *Reconciler) DeleteMachine(ctx context.Context) error
- func (r *Reconciler) Exists(ctx context.Context) (bool, error)
- func (r *Reconciler) Update(ctx context.Context) error
- func (r *Reconciler) UpdateMachine(ctx context.Context) (*ecs.Instance, error)
Constants ¶
View Source
const ( // EcsImageStatusAvailable Image status EcsImageStatusAvailable = "Available" // InstanceDefaultTimeout default timeout InstanceDefaultTimeout = 900 // DefaultWaitForInterval default interval DefaultWaitForInterval = 5 // ECSInstanceStatusPending ecs instance status Pedding ECSInstanceStatusPending = "Pending" // ECSInstanceStatusStarting ecs instance status Starting ECSInstanceStatusStarting = "Starting" // ECSInstanceStatusRunning ecs instance status Running ECSInstanceStatusRunning = "Running" // ECSInstanceStatusStopping ecs instance status Stopping ECSInstanceStatusStopping = "Stopping" // ECSInstanceStatusStopped ecs instance status Stopped ECSInstanceStatusStopped = "Stopped" // ECSTagResourceTypeInstance tag resource type ECSTagResourceTypeInstance = "instance" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Actuator ¶
type Actuator struct {
// contains filtered or unexported fields
}
Actuator is responsible for performing machine reconciliation.
func NewActuator ¶
func NewActuator(params ActuatorParams) *Actuator
NewActuator returns an actuator.
type ActuatorParams ¶
type ActuatorParams struct { Client controllerclient.Client EventRecorder record.EventRecorder AlibabaCloudClientBuilder alibabacloudClient.AlibabaCloudClientBuilderFunc ConfigManagedClient controllerclient.Client ReconcilerBuilder func(scope *machineScope) *Reconciler }
ActuatorParams holds parameter information for Actuator.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler runs the logic to reconciles a machine resource towards its desired state
func NewReconciler ¶
func NewReconciler(scope *machineScope) *Reconciler
NewReconciler creating new Reconciler instance
func (*Reconciler) Create ¶
func (r *Reconciler) Create(ctx context.Context) error
Create creates machine if and only if machine exists, handled by cluster-api
func (*Reconciler) CreateMachine ¶
func (*Reconciler) Delete ¶
func (r *Reconciler) Delete(ctx context.Context) error
Delete deletes machine
func (*Reconciler) DeleteMachine ¶
func (r *Reconciler) DeleteMachine(ctx context.Context) error
func (*Reconciler) Exists ¶
func (r *Reconciler) Exists(ctx context.Context) (bool, error)
Exists checks if machine exists
func (*Reconciler) Update ¶
func (r *Reconciler) Update(ctx context.Context) error
Update updates machine if and only if machine exists, handled by cluster-api
func (*Reconciler) UpdateMachine ¶
Click to show internal directories.
Click to hide internal directories.