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 ¶ added in v1.8.0
func IsSnapReady(sn *v1.VolumeSnapshot) bool
IsSnapReady checks whether blockvolsnapshot is in ReadyToUse state
Types ¶
type Snapshot ¶ added in v1.8.0
type Snapshot struct {
Client *SnapshotClient
Object *v1.VolumeSnapshot
Deleted bool
// contains filtered or unexported fields
}
Snapshot contains parameters needed for managing volume blockvolsnapshot
func (*Snapshot) WaitForRunning ¶ added in v1.8.0
WaitForRunning stalls until blockvolsnapshot is ready
type SnapshotClient ¶ added in v1.8.0
type SnapshotClient struct {
Interface snapshotv1.VolumeSnapshotInterface
Namespace string
Timeout int
}
SnapshotClient is a client for managing Snapshots
func (*SnapshotClient) Create ¶ added in v1.8.0
func (sc *SnapshotClient) Create(ctx context.Context, snap *v1.VolumeSnapshot) *Snapshot
Create creates a blockvolsnapshot
func (*SnapshotClient) Delete ¶ added in v1.8.0
func (sc *SnapshotClient) Delete(ctx context.Context, snap *v1.VolumeSnapshot) *Snapshot
Delete deletes a blockvolsnapshot
func (*SnapshotClient) DeleteAll ¶ added in v1.8.0
func (sc *SnapshotClient) DeleteAll(ctx context.Context) error
DeleteAll deletes all snapshots
func (*SnapshotClient) WaitForAllToBeReady ¶ added in v1.8.0
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.