Documentation ¶
Index ¶
- Constants
- type Plugin
- func (p *Plugin) ControllerExpandVolume(_ context.Context, request *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (p *Plugin) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (p *Plugin) CreateVolume(ctx context.Context, request *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (p *Plugin) DeleteVolume(ctx context.Context, request *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (p *Plugin) GetCapacity(ctx context.Context, _ *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (p *Plugin) GetPluginCapabilities(_ context.Context, _ *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (p *Plugin) GetPluginInfo(_ context.Context, _ *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (p *Plugin) NodeExpandVolume(ctx context.Context, request *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (p *Plugin) NodeGetCapabilities(_ context.Context, _ *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (p *Plugin) NodeGetInfo(_ context.Context, _ *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (p *Plugin) NodeGetVolumeStats(ctx context.Context, request *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (p *Plugin) NodePublishVolume(ctx context.Context, request *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (p *Plugin) NodeStageVolume(ctx context.Context, request *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (p *Plugin) NodeUnpublishVolume(ctx context.Context, request *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (p *Plugin) NodeUnstageVolume(ctx context.Context, request *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (p *Plugin) Probe(_ context.Context, _ *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (p *Plugin) Run(ctx context.Context) error
Constants ¶
const ( Kb = 1 << (10 * iota) Mb Gb )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct { csi.UnimplementedIdentityServer csi.UnimplementedControllerServer csi.UnimplementedNodeServer // contains filtered or unexported fields }
Plugin implements csi plugin spec
func NewPlugin ¶
func NewPlugin( name string, version string, nodeId string, nodeNameTopologyKey string, socket string, volumeManager volumes.VolumeController, mounter volumes.Mounter, logger *zap.Logger, ) *Plugin
NewPlugin returns new plugin
func (*Plugin) ControllerExpandVolume ¶
func (p *Plugin) ControllerExpandVolume(_ context.Context, request *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume expands given volume
func (*Plugin) ControllerGetCapabilities ¶
func (p *Plugin) ControllerGetCapabilities(_ context.Context, _ *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities .
func (*Plugin) CreateVolume ¶
func (p *Plugin) CreateVolume(ctx context.Context, request *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume creates a new volume from the given request
func (*Plugin) DeleteVolume ¶
func (p *Plugin) DeleteVolume(ctx context.Context, request *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume deletes the given volume
func (*Plugin) GetCapacity ¶
func (p *Plugin) GetCapacity(ctx context.Context, _ *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity returns the capacity of the storage pool
func (*Plugin) GetPluginCapabilities ¶
func (p *Plugin) GetPluginCapabilities(_ context.Context, _ *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns available capabilities of the plugin
func (*Plugin) GetPluginInfo ¶
func (p *Plugin) GetPluginInfo(_ context.Context, _ *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo returns metadata of the plugin
func (*Plugin) NodeExpandVolume ¶
func (p *Plugin) NodeExpandVolume(ctx context.Context, request *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
NodeExpandVolume .
func (*Plugin) NodeGetCapabilities ¶
func (p *Plugin) NodeGetCapabilities(_ context.Context, _ *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities returns the supported capabilities of the node server
func (*Plugin) NodeGetInfo ¶
func (p *Plugin) NodeGetInfo(_ context.Context, _ *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
NodeGetInfo returns the supported capabilities of the node server. This is used so the CO knows where to place the workload. The result of this function will be used by the CO in ControllerPublishVolume.
func (*Plugin) NodeGetVolumeStats ¶
func (p *Plugin) NodeGetVolumeStats(ctx context.Context, request *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats returns the volume capacity statistics
func (*Plugin) NodePublishVolume ¶
func (p *Plugin) NodePublishVolume(ctx context.Context, request *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume mounts staging path to target path
func (*Plugin) NodeStageVolume ¶
func (p *Plugin) NodeStageVolume(ctx context.Context, request *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume mounts the volume to a staging path
func (*Plugin) NodeUnpublishVolume ¶
func (p *Plugin) NodeUnpublishVolume(ctx context.Context, request *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume unmounts target path
func (*Plugin) NodeUnstageVolume ¶
func (p *Plugin) NodeUnstageVolume(ctx context.Context, request *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume unmounts staging path
func (*Plugin) Probe ¶
func (p *Plugin) Probe(_ context.Context, _ *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe returns the health and readiness of the plugin