plugin

package
v0.0.0-...-7d4058b Latest Latest
Warning

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

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VolumeSnapshotter

type VolumeSnapshotter struct {
	Log logrus.FieldLogger
	// contains filtered or unexported fields
}

VolumeSnapshotter is a plugin for containing state for the longhorn volume

func NewVolumeSnapshotter

func NewVolumeSnapshotter(log logrus.FieldLogger) *VolumeSnapshotter

NewVolumeSnapshotter instantiates a NewVolumeSnapshotter.

func (*VolumeSnapshotter) CreateSnapshot

func (vs *VolumeSnapshotter) CreateSnapshot(volumeID, volumeAZ string, tags map[string]string) (string, error)

CreateSnapshot creates a snapshot of the specified volume, and applies any provided set of tags to the snapshot.

func (*VolumeSnapshotter) CreateVolumeFromSnapshot

func (vs *VolumeSnapshotter) CreateVolumeFromSnapshot(snapshotID, volumeType, volumeAZ string, iops *int64) (string, error)

CreateVolumeFromSnapshot creates a new volume in the specified availability zone, initialized from the provided snapshot, and with the specified type and IOPS (if using provisioned IOPS).

func (*VolumeSnapshotter) DeleteSnapshot

func (vs *VolumeSnapshotter) DeleteSnapshot(snapshotID string) error

DeleteSnapshot deletes the specified volume snapshot.

func (*VolumeSnapshotter) GetVolumeID

func (vs *VolumeSnapshotter) GetVolumeID(unstructuredPV runtime.Unstructured) (string, error)

GetVolumeID returns the specific identifier for the PersistentVolume.

func (*VolumeSnapshotter) GetVolumeInfo

func (vs *VolumeSnapshotter) GetVolumeInfo(volumeID, volumeAZ string) (string, *int64, error)

GetVolumeInfo returns the type and IOPS (if using provisioned IOPS) for the specified volume in the given availability zone.

func (*VolumeSnapshotter) Init

func (vs *VolumeSnapshotter) Init(config map[string]string) error

Init prepares the VolumeSnapshotter for usage using the provided map of configuration key-value pairs. It returns an error if the VolumeSnapshotter cannot be initialized from the provided config. Note that after v0.10.0, this will happen multiple times.

func (*VolumeSnapshotter) SetVolumeID

func (vs *VolumeSnapshotter) SetVolumeID(unstructuredPV runtime.Unstructured, volumeID string) (runtime.Unstructured, error)

SetVolumeID sets the specific identifier for the PersistentVolume.

Jump to

Keyboard shortcuts

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