Documentation ¶
Index ¶
- Constants
- func IsSnapReady(sn *v1.VolumeSnapshot) bool
- type Snapshot
- type SnapshotClient
- func (sc *SnapshotClient) Create(ctx context.Context, snap *v1.VolumeSnapshot) *Snapshot
- func (sc *SnapshotClient) Delete(ctx context.Context, snap *v1.VolumeSnapshot) *Snapshot
- func (sc *SnapshotClient) DeleteAll(ctx context.Context) error
- func (sc *SnapshotClient) WaitForAllToBeReady(ctx context.Context) error
Constants ¶
View Source
const ( // Poll is a poll interval for Pod Poll = 2 * time.Second // Timeout is a timeout for Pod operations Timeout = 300 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func IsSnapReady ¶
func IsSnapReady(sn *v1.VolumeSnapshot) bool
IsSnapReady checks whether snapshot is in ReadyToUse state
Types ¶
type Snapshot ¶
type Snapshot struct { Client *SnapshotClient Object *v1.VolumeSnapshot Deleted bool // contains filtered or unexported fields }
Snapshot contains parameters needed for managing volume snapshot
func (*Snapshot) WaitForRunning ¶
WaitForRunning stalls until snapshot is ready
type SnapshotClient ¶
type SnapshotClient struct { Interface snapshotv1.VolumeSnapshotInterface Namespace string Timeout int }
SnapshotClient is a client for managing Snapshots
func (*SnapshotClient) Create ¶
func (sc *SnapshotClient) Create(ctx context.Context, snap *v1.VolumeSnapshot) *Snapshot
Create creates a snapshot
func (*SnapshotClient) Delete ¶
func (sc *SnapshotClient) Delete(ctx context.Context, snap *v1.VolumeSnapshot) *Snapshot
Delete deletes a snapshot
func (*SnapshotClient) DeleteAll ¶
func (sc *SnapshotClient) DeleteAll(ctx context.Context) error
DeleteAll deletes all snapshots
func (*SnapshotClient) WaitForAllToBeReady ¶
func (sc *SnapshotClient) WaitForAllToBeReady(ctx context.Context) error
WaitForAllToBeReady waits until all snapshots are in ReadyToUse state
Click to show internal directories.
Click to hide internal directories.