rclone

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDriverName is the default name of the driver
	DefaultDriverName = "rclone.csi.veloxpack.io"
)

Variables

This section is empty.

Functions

func GetVersionString

func GetVersionString(driverName string) string

GetVersionString returns a formatted version string

func GetVersionYAML

func GetVersionYAML(driverName string) (string, error)

GetVersionYAML returns the version information of the driver in YAML format

func InitRcloneLogging

func InitRcloneLogging()

InitRcloneLogging sets up rclone to log through klog This should be called during driver initialization before any rclone operations

func NewControllerServiceCapability

NewControllerServiceCapability creates a new controller service capability

func NewFakeMounter

func NewFakeMounter() (*mount.SafeFormatAndMount, error)

func NewNodeServiceCapability

func NewNodeServiceCapability(c csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability

NewNodeServiceCapability creates a new node service capability

func ParseEndpoint

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

ParseEndpoint parses the CSI endpoint

Types

type ControllerServer

type ControllerServer struct {
	Driver *Driver
	csi.UnimplementedControllerServer
}

ControllerServer implements the CSI Controller service

func NewControllerServer

func NewControllerServer(d *Driver) *ControllerServer

NewControllerServer creates a new ControllerServer

func (*ControllerServer) ControllerExpandVolume

ControllerExpandVolume is not implemented

func (*ControllerServer) ControllerGetCapabilities

ControllerGetCapabilities returns the capabilities of the controller

func (*ControllerServer) ControllerGetVolume

ControllerGetVolume is not implemented

func (*ControllerServer) ControllerModifyVolume

ControllerModifyVolume is not implemented

func (*ControllerServer) ControllerPublishVolume

ControllerPublishVolume is not implemented

func (*ControllerServer) ControllerUnpublishVolume

ControllerUnpublishVolume is not implemented

func (*ControllerServer) CreateVolume

CreateVolume validates volume parameters

func (*ControllerServer) DeleteVolume

DeleteVolume is a no-op for rclone (no cleanup needed)

func (*ControllerServer) GetCapacity

GetCapacity is not implemented

func (*ControllerServer) ListVolumes

ListVolumes is not implemented

func (*ControllerServer) ValidateVolumeCapabilities

ValidateVolumeCapabilities validates volume capabilities

type Driver

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

Driver is the main driver structure

func NewDriver

func NewDriver(options *DriverOptions) *Driver

NewDriver creates a new driver instance

func (*Driver) AddControllerServiceCapabilities

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

AddControllerServiceCapabilities adds controller service capabilities

func (*Driver) AddNodeServiceCapabilities

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

AddNodeServiceCapabilities adds node service capabilities

func (*Driver) Run

func (d *Driver) Run(testMode bool)

Run starts the CSI driver

type DriverOptions

type DriverOptions struct {
	NodeID     string
	DriverName string
	Endpoint   string
}

DriverOptions defines driver parameters specified in driver deployment

type IdentityServer

type IdentityServer struct {
	Driver *Driver
	csi.UnimplementedIdentityServer
}

IdentityServer implements the CSI Identity service

func NewDefaultIdentityServer

func NewDefaultIdentityServer(d *Driver) *IdentityServer

NewDefaultIdentityServer creates a new default IdentityServer

func (*IdentityServer) GetPluginCapabilities

GetPluginCapabilities returns the capabilities of the plugin

func (*IdentityServer) GetPluginInfo

GetPluginInfo returns plugin information including driver name and version

func (*IdentityServer) Probe

Probe checks whether the plugin is running or not

type NodeServer

type NodeServer struct {
	Driver *Driver

	csi.UnimplementedNodeServer
	// contains filtered or unexported fields
}

NodeServer implements the CSI Node service

func NewNodeServer

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

NewNodeServer creates a new node server

func (*NodeServer) NodeExpandVolume

NodeExpandVolume is not implemented

func (*NodeServer) NodeGetCapabilities

NodeGetCapabilities returns the capabilities of the node

func (*NodeServer) NodeGetInfo

NodeGetInfo returns info about the node

func (*NodeServer) NodeGetVolumeStats

NodeGetVolumeStats returns volume stats and health condition

func (*NodeServer) NodePublishVolume

NodePublishVolume mounts the rclone volume using direct rclone library integration

func (*NodeServer) NodeStageVolume

NodeStageVolume is not implemented (rclone doesn't require staging)

func (*NodeServer) NodeUnpublishVolume

NodeUnpublishVolume unmounts the rclone volume using direct stats access

func (*NodeServer) NodeUnstageVolume

NodeUnstageVolume is not implemented (rclone doesn't require staging)

type NonBlockingGRPCServer

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

NonBlockingGRPCServer defines Non blocking GRPC server interfaces

func NewNonBlockingGRPCServer

func NewNonBlockingGRPCServer() NonBlockingGRPCServer

NewNonBlockingGRPCServer creates a new NonBlockingGRPCServer

type VersionInfo

type VersionInfo struct {
	DriverName    string `json:"Driver Name"`
	DriverVersion string `json:"Driver Version"`
	RcloneVersion string `json:"Rclone 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
}

VolumeLocks manages locks for volume operations

func NewVolumeLocks

func NewVolumeLocks() *VolumeLocks

NewVolumeLocks creates a new VolumeLocks instance

func (*VolumeLocks) Release

func (vl *VolumeLocks) Release(volumeID string)

Release releases the lock for the given volumeID

func (*VolumeLocks) TryAcquire

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

TryAcquire attempts to acquire a lock for the given volumeID

Jump to

Keyboard shortcuts

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