cluster

package
v0.0.0-...-86ffc8e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

Init initializes the controller and is called by the generated code Register watches for additional resource types here.

func (*ClusterControllerImpl) Reconcile

func (c *ClusterControllerImpl) Reconcile(cluster *clusterv1.Cluster) error

Reconcile handles enqueued messages. The delete will be handled by finalizer.

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) Delete

func (a *TestActuator) Delete(*v1alpha1.Cluster) error

func (*TestActuator) Reconcile

func (a *TestActuator) Reconcile(*v1alpha1.Cluster) error

func (*TestActuator) Unblock

func (a *TestActuator) Unblock()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL