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 ¶
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
Click to show internal directories.
Click to hide internal directories.