Documentation
¶
Index ¶
- type ClusterController
- func (c *ClusterController) IsCurrentCluster(cluster *clusterv1alpha1.StorageOSCluster) bool
- func (c *ClusterController) Reconcile(m *api.StorageOSCluster, recorder record.EventRecorder) error
- func (c *ClusterController) ResetCurrentCluster()
- func (c *ClusterController) SetCurrentCluster(cluster *clusterv1alpha1.StorageOSCluster)
- func (c *ClusterController) SetCurrentClusterIfNone(cluster *clusterv1alpha1.StorageOSCluster)
- type OperatorClient
- func (oc OperatorClient) Create(ctx context.Context, obj runtime.Object) error
- func (oc OperatorClient) Delete(ctx context.Context, obj runtime.Object) error
- func (oc OperatorClient) Get(ctx context.Context, key types.NamespacedName, obj runtime.Object) error
- func (oc OperatorClient) List(ctx context.Context, opts *client.ListOptions, obj runtime.Object) error
- func (oc OperatorClient) Status() client.StatusWriter
- func (oc OperatorClient) Update(ctx context.Context, obj runtime.Object) error
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) Get ¶
func (oc OperatorClient) Get(ctx context.Context, key types.NamespacedName, obj runtime.Object) error
Get implements client.Client.
func (OperatorClient) List ¶
func (oc OperatorClient) List(ctx context.Context, opts *client.ListOptions, obj runtime.Object) error
List implements client.Client.
func (OperatorClient) Status ¶
func (oc OperatorClient) Status() client.StatusWriter
Status implements client.Client.