flexvolume

package
v1.6.5-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StatusSuccess represents the successful completion of command.
	StatusSuccess = "Success"
	// StatusFailed represents that the command failed.
	StatusFailure = "Failed"
	// StatusNotSupported represents that the command is not supported.
	StatusNotSupported = "Not supported"
)

Variables

View Source
var (
	TimeoutError = fmt.Errorf("Timeout")
)

Functions

func ProbeVolumePlugins

func ProbeVolumePlugins(pluginDir string) []volume.VolumePlugin

This is the primary entrypoint for volume plugins.

Types

type DriverCall added in v1.6.0

type DriverCall struct {
	Command string
	Timeout time.Duration
	// contains filtered or unexported fields
}

DriverCall implements the basic contract between FlexVolume and its driver. The caller is responsible for providing the required args.

func (*DriverCall) Append added in v1.6.0

func (dc *DriverCall) Append(arg string)

func (*DriverCall) AppendSpec added in v1.6.0

func (dc *DriverCall) AppendSpec(spec *volume.Spec, host volume.VolumeHost, extraOptions map[string]string) error

func (*DriverCall) Run added in v1.6.0

func (dc *DriverCall) Run() (*DriverStatus, error)

type DriverStatus added in v1.6.0

type DriverStatus struct {
	// Status of the callout. One of "Success", "Failure" or "Not supported".
	Status string `json:"status"`
	// Reason for success/failure.
	Message string `json:"message,omitempty"`
	// Path to the device attached. This field is valid only for attach calls.
	// ie: /dev/sdx
	DevicePath string `json:"device,omitempty"`
	// Cluster wide unique name of the volume.
	VolumeName string `json:"volumeName,omitempty"`
	// Represents volume is attached on the node
	Attached bool `json:"attached,omitempty"`
}

DriverStatus represents the return value of the driver callout.

type OptionsForDriver added in v1.6.0

type OptionsForDriver map[string]string

OptionsForDriver represents the spec given to the driver.

func NewOptionsForDriver added in v1.6.0

func NewOptionsForDriver(spec *volume.Spec, host volume.VolumeHost, extraOptions map[string]string) (OptionsForDriver, error)

Jump to

Keyboard shortcuts

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