rpcserver

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBackOff = wait.Backoff{
	Duration: time.Second,
	Factor:   1.5,
	Steps:    20,
	Cap:      time.Minute * 2,
}

Functions

func Run

func Run(driver *driver.DiskDriver, cloud cloud.CloudManager, mounter *mount.SafeFormatAndMount,
	endpoint string, retryTimesMax int)

Run Initial and start CSI driver

Types

type ControllerServer

type ControllerServer struct {
	// contains filtered or unexported fields
}

func NewControllerServer

func NewControllerServer(d *driver.DiskDriver, c cloud.CloudManager, maxRetry int) *ControllerServer

NewControllerServer Create controller server

func (*ControllerServer) ControllerExpandVolume

ControllerExpandVolume allows the CO to expand the size of a volume volume id is REQUIRED in csi.ControllerExpandVolumeRequest capacity range is REQUIRED in csi.ControllerExpandVolumeRequest

func (*ControllerServer) ControllerGetVolume added in v1.3.0

func (*ControllerServer) ControllerPublishVolume

csi.ControllerPublishVolumeRequest: volume id + Required

node id				+ Required
volume capability 	+ Required
readonly			+ Required (This field is NOT provided when requesting in Kubernetes)

func (*ControllerServer) ControllerUnpublishVolume

This operation MUST be idempotent csi.ControllerUnpublishVolumeRequest: volume id +Required

func (*ControllerServer) CreateSnapshot

CreateSnapshot allows the CO to create a snapshot. This operation MUST be idempotent. 1. If snapshot successfully cut and ready to use, the plugin MUST reply 0 OK. 2. If an error occurs before a snapshot is cut, the plugin SHOULD reply a corresponding error code. 3. If snapshot successfully cut but still being precessed, the plugin SHOULD return 0 OK and ready_to_use SHOULD be set to false. Source volume id is REQUIRED Snapshot name is REQUIRED

func (*ControllerServer) CreateVolume

This operation MUST be idempotent This operation MAY create three types of volumes: 1. Empty volumes: CREATE_DELETE_VOLUME 2. Restore volume from snapshot: CREATE_DELETE_VOLUME and CREATE_DELETE_SNAPSHOT 3. Clone volume: CREATE_DELETE_VOLUME and CLONE_VOLUME csi.CreateVolumeRequest: name +Required

capability			+Required

func (*ControllerServer) DeleteSnapshot

CreateSnapshot allows the CO to delete a snapshot. This operation MUST be idempotent. Snapshot id is REQUIRED

func (*ControllerServer) DeleteVolume

This operation MUST be idempotent volume id is REQUIRED in csi.DeleteVolumeRequest

func (*ControllerServer) GetCapacity

func (*ControllerServer) GetVolumeTopology

func (cs *ControllerServer) GetVolumeTopology(volume *service.Volume) []*csi.Topology

GetVolumeTopology gets csi topology from volume info.

func (*ControllerServer) IsValidTopology

func (cs *ControllerServer) IsValidTopology(volume *service.Volume, requirement *csi.TopologyRequirement) bool

func (*ControllerServer) ListSnapshots

func (*ControllerServer) ListVolumes

func (*ControllerServer) PickTopology

func (cs *ControllerServer) PickTopology(requirement *csi.TopologyRequirement) (*driver.Topology, error)

pickAvailabilityZone selects 1 zone given topology requirement. if not found, empty string is returned.

func (*ControllerServer) ValidateVolumeCapabilities

This operation MUST be idempotent csi.ValidateVolumeCapabilitiesRequest: volume id + Required

volume capability 	+ Required

type IdentityServer

type IdentityServer struct {
	// contains filtered or unexported fields
}

func NewIdentityServer

func NewIdentityServer(d *driver.DiskDriver, c cloud.CloudManager) *IdentityServer

NewIdentityServer Create identity server

func (*IdentityServer) GetPluginCapabilities

Get plugin capabilities: CONTROLLER, ACCESSIBILITY, EXPANSION

func (*IdentityServer) GetPluginInfo

func (*IdentityServer) Probe

Plugin MUST implement this RPC call

type NodeServer

type NodeServer struct {
	// contains filtered or unexported fields
}

func NewNodeServer

NewNodeServer Create node server

func (*NodeServer) NodeExpandVolume

NodeExpandVolume will expand filesystem of volume. Input Parameters:

volume id: REQUIRED
volume path: REQUIRED

func (*NodeServer) NodeGetCapabilities

func (*NodeServer) NodeGetInfo

func (*NodeServer) NodeGetVolumeStats

NodeGetVolumeStats Input Arguments:

volume id: REQUIRED
volume path: REQUIRED

func (*NodeServer) NodePublishVolume

This operation MUST be idempotent If the volume corresponding to the volume id has already been published at the specified target path, and is compatible with the specified volume capability and readonly flag, the plugin MUST reply 0 OK. csi.NodePublishVolumeRequest: volume id + Required

target path			+ Required
volume capability	+ Required
read only			+ Required (This field is NOT provided when requesting in Kubernetes)

func (*NodeServer) NodeStageVolume

This operation MUST be idempotent csi.NodeStageVolumeRequest: volume id + Required

stage target path	+ Required
volume capability	+ Required

func (*NodeServer) NodeUnpublishVolume

csi.NodeUnpublishVolumeRequest: volume id + Required

target path	+ Required

func (*NodeServer) NodeUnstageVolume

This operation MUST be idempotent csi.NodeUnstageVolumeRequest: volume id + Required

target path	+ Required

In block volume mode, the target path is never mounted to so this call will be a no-op

Jump to

Keyboard shortcuts

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