Documentation
¶
Index ¶
- type Actuator
- type ClusterController
- func (c *ClusterController) GetName() string
- func (c *ClusterController) LookupAndReconcile(key string) (err error)
- func (c *ClusterController) Run(stopCh <-chan struct{})
- func (c *ClusterController) RunAsync(stopCh <-chan struct{})
- func (c *ClusterController) StartWorkerQueue(q *controller.QueueWorker, shutdown <-chan struct{})
- type ClusterControllerImpl
- type TestActuator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actuator ¶
type Actuator interface {
// Create or update the cluster
Reconcile(*clusterv1.Cluster) error
// Delete the cluster.
Delete(*clusterv1.Cluster) error
}
Actuator controls clusters on a specific infrastructure. All methods should be idempotent unless otherwise specified.
type ClusterController ¶
type ClusterController struct {
Name string
BeforeReconcile func(key string)
AfterReconcile func(key string, err error)
Informers *sharedinformers.SharedInformers
// contains filtered or unexported fields
}
ClusterController implements the controller.ClusterController interface
func NewClusterController ¶
func NewClusterController(config *rest.Config, si *sharedinformers.SharedInformers, actuator Actuator) *ClusterController
NewController returns a new ClusterController for responding to Cluster events
func (*ClusterController) GetName ¶
func (c *ClusterController) GetName() string
func (*ClusterController) LookupAndReconcile ¶
func (c *ClusterController) LookupAndReconcile(key string) (err error)
func (*ClusterController) Run ¶
func (c *ClusterController) Run(stopCh <-chan struct{})
func (*ClusterController) RunAsync ¶
func (c *ClusterController) RunAsync(stopCh <-chan struct{})
func (*ClusterController) StartWorkerQueue ¶
func (c *ClusterController) StartWorkerQueue(q *controller.QueueWorker, shutdown <-chan struct{})
StartWorkerQueue schedules a routine to continuously process Queue messages until shutdown is closed
type ClusterControllerImpl ¶
type ClusterControllerImpl struct {
builders.DefaultControllerFns
// contains filtered or unexported fields
}
+controller:group=cluster,version=v1alpha1,kind=Cluster,resource=clusters
func (*ClusterControllerImpl) Get ¶
func (c *ClusterControllerImpl) Get(namespace, name string) (*clusterv1.Cluster, error)
func (*ClusterControllerImpl) Init ¶
func (c *ClusterControllerImpl) 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 {
BlockOnReconcile bool
BlockOnDelete bool
ReconcileCallCount int64
DeleteCallCount int64
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.