cloudprovider

package
v0.0.0-...-54e3b16 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VolumeSuccess = NewVolumeSuccess()
)

Functions

func RegisterProvider

func RegisterProvider(name string, p ProviderFactory)

Types

type Provider

type Provider interface {
	cloudprovider.Interface
	Volume() (Volume, bool)
}

Cloud provider interface

func GetProvider

func GetProvider(name string) (Provider, error)

type ProviderFactory

type ProviderFactory func() Provider

type Volume

type Volume interface {
	Init() error
	Attach(options VolumeOptions, node string) error
	Detach(device string, node string) error
	MountDevice(dir, device string, options VolumeOptions) error
	UnmountDevice(dir string) error
	WaitForAttach(device string, options VolumeOptions) error
	GetVolumeName(options VolumeOptions) error
	IsAttached(options VolumeOptions, node string) error

	ProvisionerName() string
	Provision(pv.VolumeOptions) (*v1.PersistentVolume, error)
	Delete(*v1.PersistentVolume) error
}

Volume interface of flex volume plugin

type VolumeError

type VolumeError flexvolume.DriverStatus

VolumeError is the json response of an volume operation

func NewVolumeError

func NewVolumeError(msg string, args ...interface{}) VolumeError

NewVolumeError creates failure error with given message

func NewVolumeNotSupported

func NewVolumeNotSupported(msg string) VolumeError

func NewVolumeSuccess

func NewVolumeSuccess() VolumeError

func (VolumeError) Error

func (v VolumeError) Error() string

func (VolumeError) ToJson

func (v VolumeError) ToJson() string

type VolumeOptions

type VolumeOptions map[string]interface{}

Json data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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