rpcserver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseEndpoint

func ParseEndpoint(ep string) (string, string, error)

func Run

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

Types

type ControllerServer

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

func NewControllerServer

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

func (*ControllerServer) ControllerExpandVolume

action: CSI operation resize zec cloud disk

args: ctx context.Context, req *csi.ControllerExpandVolumeRequest

return: *csi.ControllerExpandVolumeResponse, error

func (*ControllerServer) ControllerGetVolume

func (*ControllerServer) ControllerPublishVolume

action: CSI operation attach zec cloud disk to VM

args: ctx context.Context, req *csi.ControllerPublishVolumeRequest

return: *csi.ControllerPublishVolumeResponse, error

func (*ControllerServer) ControllerUnpublishVolume

action: CSI operation detach zec cloud disk from VM

args: ctx context.Context, req *csi.ControllerUnpublishVolumeRequest

return: *csi.ControllerUnpublishVolumeResponse, error

func (*ControllerServer) CreateSnapshot

func (*ControllerServer) CreateVolume

action: CSI operation create zec cloud disk

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

args: ctx context.Context, req *csi.CreateVolumeRequest

return: *csi.CreateVolumeResponse, error

func (*ControllerServer) DeleteSnapshot

func (*ControllerServer) DeleteVolume

action: CSI operation delete zec cloud disk

args: ctx context.Context, req *csi.DeleteVolumeRequest

return: *csi.DeleteVolumeResponse, error

func (*ControllerServer) GetCapacity

func (*ControllerServer) GetVolumeTopology

func (cs *ControllerServer) GetVolumeTopology(zecVolInfo *cloud.ZecVolume) []*csi.Topology

func (*ControllerServer) IsValidTopology

func (cs *ControllerServer) IsValidTopology(zecVolInfo *cloud.ZecVolume, requirement *csi.TopologyRequirement) bool

func (*ControllerServer) ListSnapshots

func (*ControllerServer) ListVolumes

func (*ControllerServer) PickTopology

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

type IdentityServer

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

func NewIdentityServer

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

func (*IdentityServer) GetPluginCapabilities

Action: Get plugin capabilities: CONTROLLER, ACCESSIBILITY, EXPANSION

func (*IdentityServer) GetPluginInfo

action: describe pv show

func (*IdentityServer) Probe

type NodeServer

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

func (*NodeServer) HasMountRefs

func (m *NodeServer) HasMountRefs(mountPath string, mountRefs []string) bool

func (*NodeServer) NodeExpandVolume

Action: This RPC call allows CO to expand volume on a node.

func (*NodeServer) NodeGetCapabilities

Action: This RPC allows the CO to check the supported capabilities of node service provided by the Plugin.

func (*NodeServer) NodeGetInfo

Action: A Node Plugin MUST implement this RPC call if the plugin has PUBLISH_UNPUBLISH_VOLUME controller capability.

The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used.
The CO SHOULD call this RPC for the node at which it wants to place the workload. The CO MAY call this RPC more than once for a given node.
The SP SHALL NOT expect the CO to call this RPC more than once. The result of this call will be used by CO in ControllerPublishVolume.

func (*NodeServer) NodeGetVolumeStats

Action: NodeGetVolumeStats RPC call returns the volume capacity statistics available for the volume.

func (*NodeServer) NodePublishVolume

action: This RPC is called by the CO when a workload that wants to use the specified volume is placed (scheduled) on a node. The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used.

func (*NodeServer) NodeStageVolume

action: This RPC is called by the CO prior to the volume being consumed by any workloads on the node by NodePublishVolume. The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used. This RPC SHOULD be called by the CO when a workload that wants to use the specified volume is placed (scheduled) on the specified node for the first time or for the first time since a NodeUnstageVolume call for the specified volume was called and returned success on that node.

func (*NodeServer) NodeUnpublishVolume

action: This RPC MUST undo the work by the corresponding NodePublishVolume. This RPC SHALL be called by the CO at least once for each target_path that was successfully setup via NodePublishVolume. If the corresponding Controller Plugin has PUBLISH_UNPUBLISH_VOLUME controller capability, the CO SHOULD issue all NodeUnpublishVolume (as specified above) before calling ControllerUnpublishVolume for the given node and the given volume. The Plugin SHALL assume that this RPC will be executed on the node where the volume is being used.

func (*NodeServer) NodeUnstageVolume

action: This RPC is a reverse operation of NodeStageVolume. This RPC MUST undo the work by the corresponding NodeStageVolume. \ This RPC SHALL be called by the CO once for each staging_target_path that was successfully setup via NodeStageVolume.

type NonBlockingGRPCServer

type NonBlockingGRPCServer interface {
	// Start services at the endpoint
	Start(endpoint string, servers Servers)
	// Waits for the service to stop
	Wait()
	// Stops the service gracefully
	Stop()
	// Stops the service forcefully
	ForceStop()
}

Defines Non blocking GRPC server interfaces

func NewNonBlockingGRPCServer

func NewNonBlockingGRPCServer() NonBlockingGRPCServer

type Servers

type Servers struct {
	IdentityServer   csi.IdentityServer
	ControllerServer csi.ControllerServer
	NodeServer       csi.NodeServer
}

Jump to

Keyboard shortcuts

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