rclone

package
v0.0.0-...-99ff02c Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DriverName    = "csi-rclone"
	DriverVersion = "latest"
)
View Source
var (
	ErrVolumeNotFound = errors.New("volume is not found")
)

Functions

func DeleteDeploymentByLabel

func DeleteDeploymentByLabel(client *kubernetes.Clientset, namespace string, lab map[string]string) error

func DeleteSecretsByLabel

func DeleteSecretsByLabel(client *kubernetes.Clientset, namespace string, lab map[string]string) error

func ListPods

func ListPods(c kubernetes.Interface, namespace, selector string) (*corev1.PodList, error)

func ListSecretsByLabel

func ListSecretsByLabel(client *kubernetes.Clientset, namespace string, lab map[string]string) (*corev1.SecretList, error)

func NewControllerServer

func NewControllerServer(d *Driver) *controllerServer

func NewNodeServer

func NewNodeServer(d *Driver) *nodeServer

func WaitForPodBySelectorRunning

func WaitForPodBySelectorRunning(c kubernetes.Interface, namespace, selector string, timeout int) error

Types

type Driver

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

func NewDriver

func NewDriver(nodeID, endpoint string, kubeClient *kubernetes.Clientset) *Driver

func (*Driver) Run

func (d *Driver) Run()

type Operations

type Operations interface {
	CreateVol(ctx context.Context, volumeName, remote, remotePath, rcloneConfigPath string, pameters map[string]string) error
	DeleteVol(ctx context.Context, rcloneVolume *RcloneVolume, rcloneConfigPath string, pameters map[string]string) error
	Mount(ctx context.Context, rcloneVolume *RcloneVolume, targetPath string, rcloneConfigData string, pameters map[string]string) error
	Unmount(ctx context.Context, volumeId string) error
	CleanupMountPoint(ctx context.Context, secrets, pameters map[string]string) error
	GetVolumeById(ctx context.Context, volumeId string) (*RcloneVolume, error)
}

func NewRclone

func NewRclone(kubeClient *kubernetes.Clientset) Operations

type Rclone

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

func (Rclone) CleanupMountPoint

func (r Rclone) CleanupMountPoint(ctx context.Context, secrets, pameters map[string]string) error

func (*Rclone) CreateVol

func (r *Rclone) CreateVol(ctx context.Context, volumeName, remote, remotePath, rcloneConfigPath string, parameters map[string]string) error

func (Rclone) DeleteVol

func (r Rclone) DeleteVol(ctx context.Context, rcloneVolume *RcloneVolume, rcloneConfigPath string, parameters map[string]string) error

func (Rclone) GetVolumeById

func (r Rclone) GetVolumeById(ctx context.Context, volumeId string) (*RcloneVolume, error)

func (*Rclone) Mount

func (r *Rclone) Mount(ctx context.Context, rcloneVolume *RcloneVolume, targetPath, rcloneConfigData string, parameters map[string]string) error

func (Rclone) Unmount

func (r Rclone) Unmount(ctx context.Context, volumeId string) error

type RcloneVolume

type RcloneVolume struct {
	Remote     string
	RemotePath string
	ID         string
}

Jump to

Keyboard shortcuts

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