Documentation ¶
Index ¶
- Constants
- type CSIStorageCapacity
- type Client
- func (c *Client) GetByStorageClass(ctx context.Context, scName string) ([]*CSIStorageCapacity, error)
- func (c *Client) SetCapacityToZero(ctx context.Context, capacities []*CSIStorageCapacity) ([]*CSIStorageCapacity, error)
- func (c *Client) Update(ctx context.Context, capacity *storagev1.CSIStorageCapacity) (*CSIStorageCapacity, error)
- func (c *Client) WaitForAllToBeCreated(ctx context.Context, scName string, expectedCount int) error
- func (c *Client) WaitForAllToBeDeleted(ctx context.Context, scName string) error
Constants ¶
View Source
const ( // Poll represents poll time interval Poll = 2 * time.Second // Timeout represents timeout Timeout = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSIStorageCapacity ¶
type CSIStorageCapacity struct { Client *Client Object *storagev1.CSIStorageCapacity }
CSIStorageCapacity contains pvc client and claim
func (*CSIStorageCapacity) WatchUntilUpdated ¶
func (csisc *CSIStorageCapacity) WatchUntilUpdated(ctx context.Context, pollInterval time.Duration) error
WatchUntilUpdated polls till CSIStorageCapacity object is updated
type Client ¶
type Client struct { Interface tcorev1.CSIStorageCapacityInterface Namespace string Timeout int }
Client contains CSIStorageCapacity interface
func (*Client) GetByStorageClass ¶
func (c *Client) GetByStorageClass(ctx context.Context, scName string) ([]*CSIStorageCapacity, error)
GetByStorageClass uses client interface to make API call for getting CSIStorageCapacity for provided StorageClass
func (*Client) SetCapacityToZero ¶
func (c *Client) SetCapacityToZero(ctx context.Context, capacities []*CSIStorageCapacity) ([]*CSIStorageCapacity, error)
SetCapacityToZero sets capacity to 0
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, capacity *storagev1.CSIStorageCapacity) (*CSIStorageCapacity, error)
Update updates storage capacity object
func (*Client) WaitForAllToBeCreated ¶
WaitForAllToBeCreated waits for CSIStorageCapacity objects to be created for a storage class
Click to show internal directories.
Click to hide internal directories.