Documentation ¶
Index ¶
- type Actuator
- type MachineController
- func (c *MachineController) GetName() string
- func (c *MachineController) LookupAndReconcile(key string) (err error)
- func (c *MachineController) Run(stopCh <-chan struct{})
- func (c *MachineController) RunAsync(stopCh <-chan struct{})
- func (c *MachineController) StartWorkerQueue(q *controller.QueueWorker, shutdown <-chan struct{})
- type MachineControllerImpl
- type TestActuator
- func (a *TestActuator) Create(*v1alpha1.Cluster, *v1alpha1.Machine) error
- func (a *TestActuator) Delete(*v1alpha1.Cluster, *v1alpha1.Machine) error
- func (a *TestActuator) Exists(*v1alpha1.Cluster, *v1alpha1.Machine) (bool, error)
- func (a *TestActuator) Unblock()
- func (a *TestActuator) Update(c *v1alpha1.Cluster, machine *v1alpha1.Machine) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actuator ¶
type Actuator interface { // Create the machine. Create(*clusterv1.Cluster, *clusterv1.Machine) error // Delete the machine. Delete(*clusterv1.Cluster, *clusterv1.Machine) error // Update the machine to the provided definition. Update(*clusterv1.Cluster, *clusterv1.Machine) error // Checks if the machine currently exists. Exists(*clusterv1.Cluster, *clusterv1.Machine) (bool, error) }
Actuator controls machines on a specific infrastructure. All methods should be idempotent unless otherwise specified.
type MachineController ¶
type MachineController struct { Name string BeforeReconcile func(key string) AfterReconcile func(key string, err error) Informers *sharedinformers.SharedInformers // contains filtered or unexported fields }
MachineController implements the controller.MachineController interface
func NewMachineController ¶
func NewMachineController(config *rest.Config, si *sharedinformers.SharedInformers, actuator Actuator) *MachineController
NewController returns a new MachineController for responding to Machine events
func (*MachineController) GetName ¶
func (c *MachineController) GetName() string
func (*MachineController) LookupAndReconcile ¶
func (c *MachineController) LookupAndReconcile(key string) (err error)
func (*MachineController) Run ¶
func (c *MachineController) Run(stopCh <-chan struct{})
func (*MachineController) RunAsync ¶
func (c *MachineController) RunAsync(stopCh <-chan struct{})
func (*MachineController) StartWorkerQueue ¶
func (c *MachineController) StartWorkerQueue(q *controller.QueueWorker, shutdown <-chan struct{})
StartWorkerQueue schedules a routine to continuously process Queue messages until shutdown is closed
type MachineControllerImpl ¶
type MachineControllerImpl struct { builders.DefaultControllerFns // contains filtered or unexported fields }
+controller:group=cluster,version=v1alpha1,kind=Machine,resource=machines
func (*MachineControllerImpl) Get ¶
func (c *MachineControllerImpl) Get(namespace, name string) (*clusterv1.Machine, error)
func (*MachineControllerImpl) Init ¶
func (c *MachineControllerImpl) Init(arguments sharedinformers.ControllerInitArguments, actuator Actuator)
Init initializes the controller and is called by the generated code Register watches for additional resource types here.
type TestActuator ¶
type TestActuator struct { BlockOnCreate bool BlockOnDelete bool BlockOnUpdate bool BlockOnExists bool CreateCallCount int64 DeleteCallCount int64 UpdateCallCount int64 ExistsCallCount int64 ExistsValue bool Lock sync.Mutex // contains filtered or unexported fields }
func NewTestActuator ¶
func NewTestActuator() *TestActuator
func (*TestActuator) Unblock ¶
func (a *TestActuator) Unblock()
Click to show internal directories.
Click to hide internal directories.