controller

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterController

type ClusterController struct {
	// contains filtered or unexported fields
}

ClusterController is the StorageOS cluster controller.

func NewClusterController

func NewClusterController(c client.Client, version string) *ClusterController

NewClusterController creates and returns a new ClusterController, given a client.

func (*ClusterController) IsCurrentCluster

func (c *ClusterController) IsCurrentCluster(cluster *clusterv1alpha1.StorageOSCluster) bool

IsCurrentCluster compares a given cluster with the current cluster to check if they are the same.

func (*ClusterController) Reconcile

func (c *ClusterController) Reconcile(m *api.StorageOSCluster, recorder record.EventRecorder) error

Reconcile ensures that the state specified in the Spec of the object matches the state of the system.

func (*ClusterController) ResetCurrentCluster

func (c *ClusterController) ResetCurrentCluster()

ResetCurrentCluster resets the current cluster of the controller.

func (*ClusterController) SetCurrentCluster

func (c *ClusterController) SetCurrentCluster(cluster *clusterv1alpha1.StorageOSCluster)

SetCurrentCluster sets the currently active cluster in the controller.

func (*ClusterController) SetCurrentClusterIfNone

func (c *ClusterController) SetCurrentClusterIfNone(cluster *clusterv1alpha1.StorageOSCluster)

SetCurrentClusterIfNone checks if there's any existing current cluster and sets a new current cluster if it wasn't set before.

type OperatorClient

type OperatorClient struct{}

OperatorClient is an adapter that implements client.Client interface for operator-SDK.

func (OperatorClient) Create

func (oc OperatorClient) Create(ctx context.Context, obj runtime.Object) error

Create implements client.Client.

func (OperatorClient) Delete

func (oc OperatorClient) Delete(ctx context.Context, obj runtime.Object) error

Delete implements client.Client.

func (OperatorClient) Get

Get implements client.Client.

func (OperatorClient) List

List implements client.Client.

func (OperatorClient) Status

func (oc OperatorClient) Status() client.StatusWriter

Status implements client.Client.

func (OperatorClient) Update

func (oc OperatorClient) Update(ctx context.Context, obj runtime.Object) error

Update implements client.Client.

Jump to

Keyboard shortcuts

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