Documentation ¶
Index ¶
- type AdaptedVolumeSnapshotter
- type RestartableVolumeSnapshotter
- func (r *RestartableVolumeSnapshotter) CreateSnapshot(volumeID string, volumeAZ string, tags map[string]string) (snapshotID string, err error)
- func (r *RestartableVolumeSnapshotter) CreateVolumeFromSnapshot(snapshotID string, volumeType string, volumeAZ string, iops *int64) (volumeID string, err error)
- func (r *RestartableVolumeSnapshotter) DeleteSnapshot(snapshotID string) error
- func (r *RestartableVolumeSnapshotter) GetVolumeID(pv runtime.Unstructured) (string, error)
- func (r *RestartableVolumeSnapshotter) GetVolumeInfo(volumeID string, volumeAZ string) (string, *int64, error)
- func (r *RestartableVolumeSnapshotter) Init(config map[string]string) error
- func (r *RestartableVolumeSnapshotter) Reinitialize(dispensed interface{}) error
- func (r *RestartableVolumeSnapshotter) SetVolumeID(pv runtime.Unstructured, volumeID string) (runtime.Unstructured, error)
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 // 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 ¶
func (r *RestartableVolumeSnapshotter) GetVolumeID(pv runtime.Unstructured) (string, error)
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 ¶
func (r *RestartableVolumeSnapshotter) SetVolumeID(pv runtime.Unstructured, volumeID string) (runtime.Unstructured, error)
SetVolumeID restarts the plugin's process if needed, then delegates the call.