volumesnapshot

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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) GetError added in v1.8.0

func (snap *Snapshot) GetError() error

GetError returns blockvolsnapshot error

func (*Snapshot) HasError added in v1.8.0

func (snap *Snapshot) HasError() bool

HasError checks whether Snapshot has error

func (*Snapshot) Name added in v1.8.0

func (snap *Snapshot) Name() string

Name returns blockvolsnapshot name

func (*Snapshot) Sync added in v1.8.0

func (snap *Snapshot) Sync(ctx context.Context) *Snapshot

Sync updates blockvolsnapshot state

func (*Snapshot) WaitForRunning added in v1.8.0

func (snap *Snapshot) WaitForRunning(ctx context.Context) error

WaitForRunning stalls until blockvolsnapshot is ready

func (*Snapshot) WaitUntilGone added in v1.8.0

func (snap *Snapshot) WaitUntilGone(ctx context.Context) error

WaitUntilGone waits until blockvolsnapshot is deleted

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

Jump to

Keyboard shortcuts

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