driver

package
v0.6.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// pick the node where less volumes are provisioned for the given pool
	// this will be the default scheduler when none provided
	VolumeWeighted = "VolumeWeighted"
)

scheduling algorithm constants

Variables

SupportedVolumeCapabilityAccessModes contains the list of supported access modes for the volume

Functions

func CreateZFSClone

func CreateZFSClone(req *csi.CreateVolumeRequest, snapshot string) (string, error)

func CreateZFSVolume

func CreateZFSVolume(req *csi.CreateVolumeRequest) (string, error)

func GetVolAndMountInfo

func GetVolAndMountInfo(
	req *csi.NodePublishVolumeRequest,
) (*apis.ZFSVolume, *apis.MountInfo, error)

func GetVolumeCapabilityAccessModes

func GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode

GetVolumeCapabilityAccessModes fetches the access modes on which the volume can be exposed

func IsSupportedVolumeCapabilityAccessMode

func IsSupportedVolumeCapabilityAccessMode(
	accessMode csi.VolumeCapability_AccessMode_Mode,
) bool

IsSupportedVolumeCapabilityAccessMode valides the requested access mode

func NewController

func NewController(d *CSIDriver) csi.ControllerServer

NewController returns a new instance of CSI controller

func NewIdentity

func NewIdentity(d *CSIDriver) csi.IdentityServer

NewIdentity returns a new instance of CSI IdentityServer

func NewNode

func NewNode(d *CSIDriver) csi.NodeServer

NewNode returns a new instance of CSI NodeServer

Types

type CSIDriver

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

TODO check if this can be renamed to Base

CSIDriver defines a common data structure for drivers

func New

func New(config *config.Config) *CSIDriver

New returns a new driver instance

func (*CSIDriver) Run

func (d *CSIDriver) Run() error

Run starts the CSI plugin by communicating over the given endpoint

type NonBlockingGRPCServer

type NonBlockingGRPCServer interface {
	// Start services at the endpoint
	Start()

	// 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(ep string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) NonBlockingGRPCServer

NewNonBlockingGRPCServer returns a new instance of NonBlockingGRPCServer

Jump to

Keyboard shortcuts

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