nfsexport

package
v0.0.0-...-c0fbbcd Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDriverName = "nfs-export.csi.k8s.io"
)

Variables

This section is empty.

Functions

func GetVersionYAML

func GetVersionYAML(driverName string) (string, error)

GetVersionYAML returns the version information of the driver in YAML format

func IsCorruptedDir

func IsCorruptedDir(dir string) bool

func ParseEndpoint

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

func Ptr

func Ptr[T any](v T) *T

Types

type ControllerServer

type ControllerServer struct {
	Driver *Driver
}

ControllerServer controller server setting

func NewControllerServer

func NewControllerServer(d *Driver) *ControllerServer

func (*ControllerServer) ControllerExpandVolume

func (*ControllerServer) ControllerGetCapabilities

ControllerGetCapabilities implements the default GRPC callout. Default supports all capabilities

func (*ControllerServer) ControllerGetVolume

func (*ControllerServer) ControllerPublishVolume

func (*ControllerServer) CreateSnapshot

func (*ControllerServer) CreateVolume

CreateVolume create a volume

func (*ControllerServer) DeleteSnapshot

func (*ControllerServer) DeleteVolume

DeleteVolume delete a volume

func (*ControllerServer) GetCapacity

func (*ControllerServer) ListSnapshots

func (*ControllerServer) ListVolumes

type Driver

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

func NewDriver

func NewDriver(options *DriverOptions, clientset *kubernetes.Clientset) *Driver

func (*Driver) AddControllerServiceCapabilities

func (n *Driver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type)

func (*Driver) AddNodeServiceCapabilities

func (n *Driver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type)

func (*Driver) Run

func (n *Driver) Run(testMode bool)

type DriverOptions

type DriverOptions struct {
	NodeID           string
	DriverName       string
	Endpoint         string
	MountPermissions uint64
	WorkingMountDir  string
}

DriverOptions defines driver parameters specified in driver deployment

type IdentityServer

type IdentityServer struct {
	Driver *Driver
}

func NewDefaultIdentityServer

func NewDefaultIdentityServer(d *Driver) *IdentityServer

func (*IdentityServer) GetPluginCapabilities

func (*IdentityServer) GetPluginInfo

func (*IdentityServer) Probe

Probe check whether the plugin is running or not. This method does not need to return anything. Currently the spec does not dictate what you should return either. Hence, return an empty response

type NodeServer

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

NodeServer driver

func NewNodeServer

func NewNodeServer(n *Driver, mounter mount.Interface) *NodeServer

func (*NodeServer) NodeExpandVolume

NodeExpandVolume node expand volume

func (*NodeServer) NodeGetCapabilities

NodeGetCapabilities return the capabilities of the Node plugin

func (*NodeServer) NodeGetInfo

NodeGetInfo return info of the node on which this plugin is running

func (*NodeServer) NodeGetVolumeStats

NodeGetVolumeStats get volume stats

func (*NodeServer) NodePublishVolume

NodePublishVolume mount the volume

func (*NodeServer) NodeStageVolume

NodeStageVolume stage volume

func (*NodeServer) NodeUnpublishVolume

NodeUnpublishVolume unmount the volume

func (*NodeServer) NodeUnstageVolume

NodeUnstageVolume unstage volume

type NonBlockingGRPCServer

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

type VersionInfo struct {
	DriverName    string `json:"Driver Name"`
	DriverVersion string `json:"Driver Version"`
	GitCommit     string `json:"Git Commit"`
	BuildDate     string `json:"Build Date"`
	GoVersion     string `json:"Go Version"`
	Compiler      string `json:"Compiler"`
	Platform      string `json:"Platform"`
}

VersionInfo holds the version information of the driver

func GetVersion

func GetVersion(driverName string) VersionInfo

GetVersion returns the version information of the driver

type VolumeLocks

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

func NewVolumeLocks

func NewVolumeLocks() *VolumeLocks

func (*VolumeLocks) Release

func (vl *VolumeLocks) Release(volumeID string)

func (*VolumeLocks) TryAcquire

func (vl *VolumeLocks) TryAcquire(volumeID string) bool

Jump to

Keyboard shortcuts

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