driver

package
v0.0.0-...-fb1fb40 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	Name    string
	Path    string
	Options map[string]string
}

CreateRequest holds fields necessary for creating a volume

type RemoveRequest

type RemoveRequest struct {
	Name string
}

RemoveRequest holds fields necessary for removing a volume

type VolumeDriver

type VolumeDriver interface {
	// Setup is used to add a volume to the driver's state.
	// It should be called when the state of a volume is being loaded from storage.
	Setup(volumeName string, volume *types.Volume)

	// Create mounts the volume on the host.
	Create(createRequest *CreateRequest) error

	// Remove unmounts the volume from the host.
	Remove(removeRequest *RemoveRequest) error

	// Method to check if a volume is currently mounted.
	IsMounted(volumeName string) bool
}

VolumeDriver contains the methods for volume drivers to implement

Directories

Path Synopsis
Package mock_driver is a generated GoMock package.
Package mock_driver is a generated GoMock package.

Jump to

Keyboard shortcuts

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