Documentation ¶
Index ¶
- Constants
- func GetUserAgent(driverName, customUserAgent, userAgentSuffix string) string
- func GetVersionYAML(driverName string) (string, error)
- func IsCorruptedDir(dir string) bool
- type Driver
- func (d *Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (f *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (f *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (d *Driver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (d *Driver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (d *Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (f *Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (d *Driver) Run(endpoint string, kubeconfig string, testBool bool)
- func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type DriverOptions
- type VersionInfo
Constants ¶
const ( VolumeContextMDSIPAddress = "mgs-ip-address" VolumeContextFSName = "fs-name" )
const (
// DefaultDriverName holds the name of the csi-driver
DefaultDriverName = "azurelustre.csi.azure.com"
)
Variables ¶
This section is empty.
Functions ¶
func GetUserAgent ¶
GetUserAgent returns user agent of the driver
func GetVersionYAML ¶
GetVersionYAML returns the version information of the driver in YAML format
func IsCorruptedDir ¶
Types ¶
type Driver ¶
type Driver struct { csicommon.CSIDriver csicommon.DefaultIdentityServer csicommon.DefaultControllerServer csicommon.DefaultNodeServer // contains filtered or unexported fields }
Driver implements all interfaces of CSI drivers
func NewDriver ¶
func NewDriver(options *DriverOptions) *Driver
NewDriver Creates a NewCSIDriver object. Assumes vendor version is equal to driver version & does not support optional driver plugin info manifest field. Refer to CSI spec for more details.
func (*Driver) ControllerGetCapabilities ¶
func (d *Driver) ControllerGetCapabilities( ctx context.Context, req *csi.ControllerGetCapabilitiesRequest, ) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities returns the capabilities of the Controller plugin
func (*Driver) CreateVolume ¶
func (d *Driver) CreateVolume( ctx context.Context, req *csi.CreateVolumeRequest, ) (*csi.CreateVolumeResponse, error)
CreateVolume provisions a volume
func (*Driver) DeleteVolume ¶
func (d *Driver) DeleteVolume( ctx context.Context, req *csi.DeleteVolumeRequest, ) (*csi.DeleteVolumeResponse, error)
DeleteVolume delete a volume
func (*Driver) GetPluginCapabilities ¶
func (f *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns the capabilities of the plugin
func (*Driver) GetPluginInfo ¶
func (f *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo return the version and name of the plugin
func (*Driver) NodeGetCapabilities ¶
func (d *Driver) NodeGetCapabilities( ctx context.Context, req *csi.NodeGetCapabilitiesRequest, ) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities return the capabilities of the Node plugin
func (*Driver) NodeGetInfo ¶
func (d *Driver) NodeGetInfo( ctx context.Context, req *csi.NodeGetInfoRequest, ) (*csi.NodeGetInfoResponse, error)
NodeGetInfo return info of the node on which this plugin is running
func (*Driver) NodeGetVolumeStats ¶
func (d *Driver) NodeGetVolumeStats( ctx context.Context, req *csi.NodeGetVolumeStatsRequest, ) (*csi.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats get volume stats
func (*Driver) NodePublishVolume ¶
func (d *Driver) NodePublishVolume( ctx context.Context, req *csi.NodePublishVolumeRequest, ) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume mount the volume from staging to target path
func (*Driver) NodeUnpublishVolume ¶
func (d *Driver) NodeUnpublishVolume( ctx context.Context, req *csi.NodeUnpublishVolumeRequest, ) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume unmount the volume from the target path
func (*Driver) Probe ¶
func (f *Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe check whether the plugin is running or not. This method does not need to return anything. Currently the spec does not dictate what you should return either. Hence, return an empty response
func (*Driver) ValidateVolumeCapabilities ¶
func (d *Driver) ValidateVolumeCapabilities( ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest, ) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities return the capabilities of the volume
type DriverOptions ¶
DriverOptions defines driver parameters specified in driver deployment
type VersionInfo ¶
type VersionInfo struct { DriverName string `json:"Driver Name"` DriverVersion string `json:"Driver Version"` GitCommit string `json:"Git Commit"` BuildDate string `json:"Build Date"` GoVersion string `json:"Go Version"` Compiler string `json:"Compiler"` Platform string `json:"Platform"` }
VersionInfo holds the version information of the driver
func GetVersion ¶
func GetVersion(driverName string) VersionInfo
GetVersion returns the version information of the driver