driver

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusSuccess      Status = "Success"
	StatusFailure      Status = "Failure"
	StatusNotSupported Status = "Not Supported"
	BoolTrue           Bool   = "True"
	BoolFalse          Bool   = "False"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachResponse

type AttachResponse struct {
	CommonResponse
	Device string `json:"device"`
}

type Bool

type Bool string

type CommonResponse

type CommonResponse struct {
	Status  Status `json:"status"`
	Message string `json:"message"`
}

type FlexVolume

type FlexVolume interface {
	Init() InitResponse
	Attach(map[string]string, string) AttachResponse
	Detach(string, string) CommonResponse
	WaitForAttach(string, map[string]string) AttachResponse
	IsAttached(map[string]string, string) IsAttachedResponse
	Mount(string, string, map[string]string) CommonResponse
	Unmount(string) CommonResponse
}

type FlexVolumeDriver

type FlexVolumeDriver struct {
	Logger *logrus.Logger
}

func (*FlexVolumeDriver) Init

func (f *FlexVolumeDriver) Init() InitResponse

func (*FlexVolumeDriver) Mount

func (f *FlexVolumeDriver) Mount(args []string) CommonResponse

func (*FlexVolumeDriver) Unmount

func (f *FlexVolumeDriver) Unmount(args []string) CommonResponse

type InitResponse

type InitResponse struct {
	CommonResponse
	Capabilities struct {
		Attach bool `json:"attach"`
	} `json:"capabilities"`
}

type IsAttachedResponse

type IsAttachedResponse struct {
	CommonResponse
	Attached Bool `json:"attached"`
}

type Options

type Options struct {
	ClusterName   string `json:"clusterName,omitempty" valid:"required"`
	ClusterID     string `json:"clusterID,omitempty" valid:"required"`
	ProjectName   string `json:"projectName,omitempty" valid:"required"`
	ProjectID     string `json:"projectID,omitempty" valid:"required"`
	Namespace     string `json:"namespace,omitempty" valid:"required"`
	WorkloadName  string `json:"workloadName,omitempty" valid:"required"`
	ContainerName string `json:"containerName,omitempty" valid:"required"`
	Format        string `json:"format,omitempty" valid:"required"`
	VolumeName    string `json:"volumeName,omitempty" valid:"required"`
	PodName       string `json:"kubernetes.io/pod.name,omitempty" valid:"required"`
	PodUID        string `json:"kubernetes.io/pod.uid,omitempty" valid:"required"`
}

type Status

type Status string

Jump to

Keyboard shortcuts

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