v1

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaptedVolumeSnapshotter

type AdaptedVolumeSnapshotter struct {
	Kind common.PluginKind

	// Get returns a restartable VolumeSnapshotter for the given name and process, wrapping if necessary
	GetRestartable func(name string, restartableProcess process.RestartableProcess) vsv1.VolumeSnapshotter
}

AdaptedVolumeSnapshotter is a volume snapshotter adapted to the v1 VolumeSnapshotter API

func AdaptedVolumeSnapshotters

func AdaptedVolumeSnapshotters() []AdaptedVolumeSnapshotter

type RestartableVolumeSnapshotter

type RestartableVolumeSnapshotter struct {
	Key                 process.KindAndName
	SharedPluginProcess process.RestartableProcess
	// contains filtered or unexported fields
}

RestartableVolumeSnapshotter is a volume snapshotter for a given implementation (such as "aws"). It is associated with a restartableProcess, which may be shared and used to run multiple plugins. At the beginning of each method call, the restartableVolumeSnapshotter asks its restartableProcess to restart itself if needed (e.g. if the process terminated for any reason), then it proceeds with the actual call.

func NewRestartableVolumeSnapshotter

func NewRestartableVolumeSnapshotter(name string, sharedPluginProcess process.RestartableProcess) *RestartableVolumeSnapshotter

NewRestartableVolumeSnapshotter returns a new restartableVolumeSnapshotter.

func (*RestartableVolumeSnapshotter) CreateSnapshot

func (r *RestartableVolumeSnapshotter) CreateSnapshot(volumeID string, volumeAZ string, tags map[string]string) (snapshotID string, err error)

CreateSnapshot restarts the plugin's process if needed, then delegates the call.

func (*RestartableVolumeSnapshotter) CreateVolumeFromSnapshot

func (r *RestartableVolumeSnapshotter) CreateVolumeFromSnapshot(snapshotID string, volumeType string, volumeAZ string, iops *int64) (volumeID string, err error)

CreateVolumeFromSnapshot restarts the plugin's process if needed, then delegates the call.

func (*RestartableVolumeSnapshotter) DeleteSnapshot

func (r *RestartableVolumeSnapshotter) DeleteSnapshot(snapshotID string) error

DeleteSnapshot restarts the plugin's process if needed, then delegates the call.

func (*RestartableVolumeSnapshotter) GetVolumeID

GetVolumeID restarts the plugin's process if needed, then delegates the call.

func (*RestartableVolumeSnapshotter) GetVolumeInfo

func (r *RestartableVolumeSnapshotter) GetVolumeInfo(volumeID string, volumeAZ string) (string, *int64, error)

GetVolumeInfo restarts the plugin's process if needed, then delegates the call.

func (*RestartableVolumeSnapshotter) Init

func (r *RestartableVolumeSnapshotter) Init(config map[string]string) error

Init initializes the volume snapshotter instance using config. If this is the first invocation, r stores config for future reinitialization needs. Init does NOT restart the shared plugin process. Init may only be called once.

func (*RestartableVolumeSnapshotter) Reinitialize

func (r *RestartableVolumeSnapshotter) Reinitialize(dispensed interface{}) error

reinitialize reinitializes a re-dispensed plugin using the initial data passed to Init().

func (*RestartableVolumeSnapshotter) SetVolumeID

SetVolumeID restarts the plugin's process if needed, then delegates the call.

Jump to

Keyboard shortcuts

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