csicommon

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewControllerServiceCapability

func NewControllerServiceCapability(ctrlCap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability

NewControllerServiceCapability returns controller capabilities

func NewVolumeCapabilityAccessMode

func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *csi.VolumeCapability_AccessMode

NewVolumeCapabilityAccessMode returns volume access mode

func RunControllerPublishServer

func RunControllerPublishServer(endpoint, hstOption string, d *CSIDriver, cs csi.ControllerServer, m bool)

RunControllerPublishServer starts controller server

func RunControllerandNodePublishServer

func RunControllerandNodePublishServer(endpoint, hstOption string, d *CSIDriver, cs csi.ControllerServer, ns csi.NodeServer, m bool)

RunControllerandNodePublishServer starts both controller and node server

func RunNodePublishServer

func RunNodePublishServer(endpoint, hstOption string, d *CSIDriver, ns csi.NodeServer, m bool)

RunNodePublishServer starts node server

Types

type CSIDriver

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

CSIDriver stores driver information

func NewCSIDriver

func NewCSIDriver(name, v, nodeID string) *CSIDriver

NewCSIDriver 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 (*CSIDriver) AddControllerServiceCapabilities

func (d *CSIDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type)

AddControllerServiceCapabilities stores the controller capabilities in driver object

func (*CSIDriver) AddVolumeCapabilityAccessModes

func (d *CSIDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability_AccessMode

AddVolumeCapabilityAccessModes stores volume access modes

func (*CSIDriver) GetVolumeCapabilityAccessModes

func (d *CSIDriver) GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode

GetVolumeCapabilityAccessModes returns access modes

func (*CSIDriver) ValidateControllerServiceRequest

func (d *CSIDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error

ValidateControllerServiceRequest validates the controller plugin capabilities

type DefaultControllerServer

type DefaultControllerServer struct {
	Driver *CSIDriver
}

DefaultControllerServer points to default driver

func NewDefaultControllerServer

func NewDefaultControllerServer(d *CSIDriver) *DefaultControllerServer

NewDefaultControllerServer initializes default controller server

func (*DefaultControllerServer) ControllerExpandVolume

ControllerExpandVolume expand volume

func (*DefaultControllerServer) ControllerGetCapabilities

ControllerGetCapabilities implements the default GRPC callout. Default supports all capabilities

func (*DefaultControllerServer) ControllerPublishVolume

ControllerPublishVolume publish volume on node

func (*DefaultControllerServer) ControllerUnpublishVolume

ControllerUnpublishVolume unpublish on node

func (*DefaultControllerServer) CreateSnapshot

CreateSnapshot creates snapshot

func (*DefaultControllerServer) DeleteSnapshot

DeleteSnapshot deletes snapshot

func (*DefaultControllerServer) GetCapacity

GetCapacity get volume capacity

func (*DefaultControllerServer) ListSnapshots

ListSnapshots lists snapshosts

func (*DefaultControllerServer) ListVolumes

ListVolumes lists volumes

type DefaultIdentityServer

type DefaultIdentityServer struct {
	Driver *CSIDriver
}

DefaultIdentityServer stores driver object

func NewDefaultIdentityServer

func NewDefaultIdentityServer(d *CSIDriver) *DefaultIdentityServer

NewDefaultIdentityServer initializes default identity servier

func (*DefaultIdentityServer) GetPluginCapabilities

GetPluginCapabilities returns plugin capabilities

func (*DefaultIdentityServer) GetPluginInfo

GetPluginInfo returns plugin information

func (*DefaultIdentityServer) Probe

Probe returns empty response

type DefaultNodeServer

type DefaultNodeServer struct {
	Driver *CSIDriver
	Type   string
}

DefaultNodeServer stores driver object

func NewDefaultNodeServer

func NewDefaultNodeServer(d *CSIDriver, t string) *DefaultNodeServer

NewDefaultNodeServer initializes default node server

func (*DefaultNodeServer) NodeExpandVolume

NodeExpandVolume returns unimplemented response

func (*DefaultNodeServer) NodeGetCapabilities

NodeGetCapabilities returns RPC unknow capability

func (*DefaultNodeServer) NodeGetInfo

NodeGetInfo returns node ID

func (*DefaultNodeServer) NodeGetVolumeStats

NodeGetVolumeStats returns volume stats

func (*DefaultNodeServer) NodeStageVolume

NodeStageVolume returns unimplemented response

func (*DefaultNodeServer) NodeUnstageVolume

NodeUnstageVolume returns unimplemented response

type NonBlockingGRPCServer

type NonBlockingGRPCServer interface {
	// Start services at the endpoint
	Start(endpoint, hstOptions string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer, metrics bool)
	// Waits for the service to stop
	Wait()
	// Stops the service gracefully
	Stop()
	// Stops the service forcefully
	ForceStop()
}

NonBlockingGRPCServer defines Non blocking GRPC server interfaces

func NewNonBlockingGRPCServer

func NewNonBlockingGRPCServer() NonBlockingGRPCServer

NewNonBlockingGRPCServer return non-blocking GRPC

Jump to

Keyboard shortcuts

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