Documentation ¶
Index ¶
- func SetInstance(i Ops)
- type Client
- func (c *Client) CreateStorageCluster(cluster *corev1.StorageCluster) (*corev1.StorageCluster, error)
- func (c *Client) CreateStorageNode(node *corev1.StorageNode) (*corev1.StorageNode, error)
- func (c *Client) DeleteStorageCluster(name, namespace string) error
- func (c *Client) DeleteStorageNode(name, namespace string) error
- func (c *Client) GetStorageCluster(name, namespace string) (*corev1.StorageCluster, error)
- func (c *Client) GetStorageNode(name, namespace string) (*corev1.StorageNode, error)
- func (c *Client) ListStorageClusters(namespace string) (*corev1.StorageClusterList, error)
- func (c *Client) ListStorageNodes(namespace string) (*corev1.StorageNodeList, error)
- func (c *Client) SetConfig(cfg *rest.Config)
- func (c *Client) UpdateStorageCluster(cluster *corev1.StorageCluster) (*corev1.StorageCluster, error)
- func (c *Client) UpdateStorageClusterStatus(cluster *corev1.StorageCluster) (*corev1.StorageCluster, error)
- func (c *Client) UpdateStorageNode(node *corev1.StorageNode) (*corev1.StorageNode, error)
- func (c *Client) UpdateStorageNodeCondition(status *corev1.NodeStatus, condition *corev1.NodeCondition) bool
- func (c *Client) UpdateStorageNodeStatus(node *corev1.StorageNode) (*corev1.StorageNode, error)
- type Ops
- type StorageClusterOps
- type StorageNodeOps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetInstance ¶
func SetInstance(i Ops)
SetInstance replaces the instance with the provided one. Should be used only for testing purposes.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for the operator client.
func NewForConfig ¶
NewForConfig builds a new operator client for the given config.
func (*Client) CreateStorageCluster ¶
func (c *Client) CreateStorageCluster(cluster *corev1.StorageCluster) (*corev1.StorageCluster, error)
CreateStorageCluster creates the given StorageCluster
func (*Client) CreateStorageNode ¶
func (c *Client) CreateStorageNode(node *corev1.StorageNode) (*corev1.StorageNode, error)
CreateStorageNode creates the given StorageNode
func (*Client) DeleteStorageCluster ¶
DeleteStorageCluster deletes the given StorageCluster
func (*Client) DeleteStorageNode ¶
DeleteStorageNode deletes the given StorageNode
func (*Client) GetStorageCluster ¶
func (c *Client) GetStorageCluster(name, namespace string) (*corev1.StorageCluster, error)
GetStorageCluster gets the StorageCluster with given name and namespace
func (*Client) GetStorageNode ¶
func (c *Client) GetStorageNode(name, namespace string) (*corev1.StorageNode, error)
GetStorageNode gets the StorageNode with given name and namespace
func (*Client) ListStorageClusters ¶
func (c *Client) ListStorageClusters(namespace string) (*corev1.StorageClusterList, error)
ListStorageClusters lists all the StorageClusters
func (*Client) ListStorageNodes ¶
func (c *Client) ListStorageNodes(namespace string) (*corev1.StorageNodeList, error)
ListStorageNodes lists all the StorageNodes
func (*Client) UpdateStorageCluster ¶
func (c *Client) UpdateStorageCluster(cluster *corev1.StorageCluster) (*corev1.StorageCluster, error)
UpdateStorageCluster updates the given StorageCluster
func (*Client) UpdateStorageClusterStatus ¶
func (c *Client) UpdateStorageClusterStatus(cluster *corev1.StorageCluster) (*corev1.StorageCluster, error)
UpdateStorageClusterStatus update the status of given StorageCluster
func (*Client) UpdateStorageNode ¶
func (c *Client) UpdateStorageNode(node *corev1.StorageNode) (*corev1.StorageNode, error)
UpdateStorageNode updates the given StorageNode
func (*Client) UpdateStorageNodeCondition ¶
func (c *Client) UpdateStorageNodeCondition( status *corev1.NodeStatus, condition *corev1.NodeCondition, ) bool
UpdateStorageNodeCondition updates or creates the given condition in node status. Returns true if the condition is new or was changed.
func (*Client) UpdateStorageNodeStatus ¶
func (c *Client) UpdateStorageNodeStatus(node *corev1.StorageNode) (*corev1.StorageNode, error)
UpdateStorageNodeStatus update the status of given StorageNode
type Ops ¶
type Ops interface { StorageClusterOps StorageNodeOps // SetConfig sets the config and resets the client SetConfig(config *rest.Config) }
Ops is an interface to Operator operations.
func NewInstanceFromConfigFile ¶
NewInstanceFromConfigFile returns new instance of client by using given config file
type StorageClusterOps ¶
type StorageClusterOps interface { // CreateStorageCluster creates the given StorageCluster CreateStorageCluster(*corev1.StorageCluster) (*corev1.StorageCluster, error) // UpdateStorageCluster updates the given StorageCluster UpdateStorageCluster(*corev1.StorageCluster) (*corev1.StorageCluster, error) // GetStorageCluster gets the StorageCluster with given name and namespace GetStorageCluster(string, string) (*corev1.StorageCluster, error) // ListStorageClusters lists all the StorageClusters ListStorageClusters(string) (*corev1.StorageClusterList, error) // DeleteStorageCluster deletes the given StorageCluster DeleteStorageCluster(string, string) error // UpdateStorageClusterStatus update the status of given StorageCluster UpdateStorageClusterStatus(*corev1.StorageCluster) (*corev1.StorageCluster, error) }
StorageClusterOps is an interface to perfrom k8s StorageCluster operations
type StorageNodeOps ¶
type StorageNodeOps interface { // CreateStorageNode creates the given StorageNode CreateStorageNode(*corev1.StorageNode) (*corev1.StorageNode, error) // UpdateStorageNode updates the given StorageNode UpdateStorageNode(*corev1.StorageNode) (*corev1.StorageNode, error) // GetStorageNode gets the StorageNode with given name and namespace GetStorageNode(string, string) (*corev1.StorageNode, error) // ListStorageNodes lists all the StorageNodes ListStorageNodes(string) (*corev1.StorageNodeList, error) // DeleteStorageNode deletes the given StorageNode DeleteStorageNode(string, string) error // UpdateStorageNodeStatus update the status of given StorageNode UpdateStorageNodeStatus(*corev1.StorageNode) (*corev1.StorageNode, error) // UpdateStorageNodeCondition updates or creates the given condition in node status. // Returns true if the condition is new or was changed. UpdateStorageNodeCondition(*corev1.NodeStatus, *corev1.NodeCondition) bool }
StorageNodeOps is an interface to perfrom k8s StorageNode operations