plugin

package
v0.0.0-...-892e993 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
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

ControllerExpandVolume expands given volume

func (*Plugin) ControllerGetCapabilities

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

GetCapacity returns the capacity of the storage pool

func (*Plugin) GetPluginCapabilities

GetPluginCapabilities returns available capabilities of the plugin

func (*Plugin) GetPluginInfo

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

NodeGetCapabilities returns the supported capabilities of the node server

func (*Plugin) NodeGetInfo

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

Probe returns the health and readiness of the plugin

func (*Plugin) Run

func (p *Plugin) Run(ctx context.Context) error

Run runs grpc server and socket listening

Jump to

Keyboard shortcuts

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