csistoragecapacity

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

Update updates storage capacity object

func (*Client) WaitForAllToBeCreated

func (c *Client) WaitForAllToBeCreated(ctx context.Context, scName string, expectedCount int) error

WaitForAllToBeCreated waits for CSIStorageCapacity objects to be created for a storage class

func (*Client) WaitForAllToBeDeleted

func (c *Client) WaitForAllToBeDeleted(ctx context.Context, scName string) error

WaitForAllToBeDeleted waits for CSIStorageCapacity objects to be deleted for a storage class

Jump to

Keyboard shortcuts

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