Documentation
¶
Index ¶
Constants ¶
View Source
const ( // StatusSuccess returned when the operation succeeded StatusSuccess = "Success" // StatusFailure returned when the operation failed StatusFailure = "Failure" // StatusNotSupported returned when the operation is not supported StatusNotSupported = "Not supported" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilitiesResponse ¶
type CapabilitiesResponse struct {
// Attach value is True/False (depending if the driver implements attach and detach)
Attach bool `json:"attach"`
FSGroup bool `json:"fsGroup"`
SupportsMetrics bool `json:"supportsMetrics"`
}
CapabilitiesResponse represents a capabilities response of the init command
type FlexPlugin ¶
type FlexPlugin interface {
// Init method is to initialize the flexvolume, it is a no op right now
Init() FlexVolumeResponse
// Mount method allows to mount the volume/fileset to a given location for a pod
Mount(mountRequest FlexVolumeMountRequest) FlexVolumeResponse
// Unmount methods unmounts the volume/ fileset from the pod
Unmount(unmountRequest FlexVolumeUnmountRequest) FlexVolumeResponse
}
FlexPlugin is a partial interface of the flexvolume volume plugin
type FlexVolumeMountRequest ¶
type FlexVolumeMountRequest struct {
// MountDir is the path where the volume should be mounted
MountDir string `json:"mountDir"`
// Opts are the plugin options
Opts map[string]string `json:"opts"`
}
FlexVolumeMountRequest represents a mount request from the volume plugin
type FlexVolumeResponse ¶
type FlexVolumeResponse struct {
// Status should be either "Success", "Failure" or "Not supported".
Status string `json:"status"`
// Reason for success or failure.
Message string `json:"message,omitempty"`
// Capabilities used in Init responses
Capabilities CapabilitiesResponse `json:"capabilities,omitempty"`
}
FlexVolumeResponse represents a response of the volume plugin
type FlexVolumeUnmountRequest ¶
type FlexVolumeUnmountRequest struct {
// MountDir is the path to the mountpoint of the volume to be unmounted
MountDir string `json:"mountDir"`
}
FlexVolumeUnmountRequest represents an unmount request from the volume plugin
Click to show internal directories.
Click to hide internal directories.