csicommon

package
v0.0.0-...-66ce57e Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: Apache-2.0 Imports: 14 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 RunControllerandNodePublishServer

func RunControllerandNodePublishServer(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)

func ShortenString

func ShortenString(str string, n int) string

ShortenString returns the first N slice of a string.

Types

type CSIDriver

type CSIDriver struct {
	Name      string
	NodeID    string
	Version   string
	ClientSet *kubernetes.Clientset
	// contains filtered or unexported fields
}

func NewCSIDriver

func NewCSIDriver(name string, v string, nodeID string, clientSet *kubernetes.Clientset) *CSIDriver

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)

func (*CSIDriver) AddVolumeCapabilityAccessModes

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

func (*CSIDriver) GetVolumeCapabilityAccessModes

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

func (*CSIDriver) ValidateControllerServiceRequest

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

type DefaultControllerServer

type DefaultControllerServer struct {
	Driver *CSIDriver
}

func NewDefaultControllerServer

func NewDefaultControllerServer(d *CSIDriver) *DefaultControllerServer

func (*DefaultControllerServer) ControllerGetCapabilities

ControllerGetCapabilities implements the default GRPC callout. Default supports all capabilities

func (*DefaultControllerServer) ControllerGetVolume

ControllerGetVolume is still an alpha feature, we do not support it now

func (*DefaultControllerServer) ControllerPublishVolume

func (*DefaultControllerServer) ControllerUnpublishVolume

func (*DefaultControllerServer) CreateSnapshot

func (*DefaultControllerServer) CreateVolume

func (*DefaultControllerServer) DeleteSnapshot

func (*DefaultControllerServer) DeleteVolume

func (*DefaultControllerServer) GetCapacity

func (*DefaultControllerServer) ListSnapshots

func (*DefaultControllerServer) ListVolumes

func (*DefaultControllerServer) ValidateVolumeCapabilities

type DefaultIdentityServer

type DefaultIdentityServer struct {
	Driver *CSIDriver
}

func NewDefaultIdentityServer

func NewDefaultIdentityServer(d *CSIDriver) *DefaultIdentityServer

func (*DefaultIdentityServer) GetPluginCapabilities

func (*DefaultIdentityServer) GetPluginInfo

func (*DefaultIdentityServer) Probe

type DefaultNodeServer

type DefaultNodeServer struct {
	Driver *CSIDriver
}

func NewDefaultNodeServer

func NewDefaultNodeServer(d *CSIDriver) *DefaultNodeServer

func (*DefaultNodeServer) NodeExpandVolume

func (*DefaultNodeServer) NodeGetCapabilities

func (*DefaultNodeServer) NodeGetInfo

func (*DefaultNodeServer) NodeGetVolumeStats

func (*DefaultNodeServer) NodePublishVolume

func (*DefaultNodeServer) NodeStageVolume

func (*DefaultNodeServer) NodeUnpublishVolume

func (*DefaultNodeServer) NodeUnstageVolume

type NonBlockingGRPCServer

type NonBlockingGRPCServer interface {
	// Start services at the endpoint
	Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)
	// 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

Jump to

Keyboard shortcuts

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