Documentation
¶
Index ¶
- Constants
- Variables
- func NewControllerServer(csiDriver *csicommon.CSIDriver) *controllerServer
- func NewNodeServer(csiDriver *csicommon.CSIDriver, cacheDir string, cacheSize string) (*nodeServer, error)
- type ConfigCreateRequest
- type ConfigDeleteRequest
- type Driver
- type MountOpt
- type MountRequest
- type Operations
- type Rclone
- func (r *Rclone) Cleanup() error
- func (r *Rclone) CreateVol(ctx context.Context, volumeName, remote, remotePath, rcloneConfigPath string, ...) error
- func (r Rclone) DeleteVol(ctx context.Context, rcloneVolume *RcloneVolume, rcloneConfigPath string, ...) error
- func (r Rclone) GetVolumeById(ctx context.Context, volumeId string) (*RcloneVolume, error)
- func (r *Rclone) Mount(ctx context.Context, rcloneVolume *RcloneVolume, ...) error
- func (r *Rclone) Run() error
- func (r Rclone) Unmount(ctx context.Context, volumeId string, targetPath string) error
- type RcloneVolume
- type UnmountRequest
- type VfsOpt
Constants ¶
View Source
const CSI_ANNOTATION_PREFIX = "csi-rclone.dev"
Variables ¶
View Source
var (
DriverVersion = "SwissDataScienceCenter"
)
View Source
var (
ErrVolumeNotFound = errors.New("volume is not found")
)
Functions ¶
func NewControllerServer ¶
Types ¶
type ConfigCreateRequest ¶
type ConfigDeleteRequest ¶
type ConfigDeleteRequest struct {
Name string `json:"name"`
}
type Driver ¶
func (*Driver) WithControllerServer ¶ added in v0.3.7
func (*Driver) WithNodeServer ¶ added in v0.3.7
type MountOpt ¶
type MountOpt struct {
DebugFUSE bool `json:",omitempty"`
AllowNonEmpty bool `json:",omitempty"`
AllowRoot bool `json:",omitempty"`
AllowOther bool `json:",omitempty"`
DefaultPermissions bool `json:",omitempty"`
WritebackCache bool `json:",omitempty"`
DaemonWait string `json:",omitempty"` // time to wait for ready mount from daemon, maximum on Linux or constant on macOS/BSD
MaxReadAhead string `json:",omitempty"`
ExtraOptions []string `json:",omitempty"`
ExtraFlags []string `json:",omitempty"`
AttrTimeout string `json:",omitempty"` // how long the kernel caches attribute for
DeviceName string `json:",omitempty"`
VolumeName string `json:",omitempty"`
NoAppleDouble bool `json:",omitempty"`
NoAppleXattr bool `json:",omitempty"`
AsyncRead bool `json:",omitempty"`
CaseInsensitive string `json:",omitempty"`
}
Options for creating the mount
Note that options not supported on Linux have been removed.
type MountRequest ¶
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, readOnly bool, pameters map[string]string) error
Unmount(ctx context.Context, volumeId string, targetPath string) error
GetVolumeById(ctx context.Context, volumeId string) (*RcloneVolume, error)
Cleanup() error
Run() error
}
func NewRclone ¶
func NewRclone(kubeClient *kubernetes.Clientset, port int, cacheDir string, cacheSize string) Operations
type Rclone ¶
type Rclone struct {
// contains filtered or unexported fields
}
func (Rclone) GetVolumeById ¶
type RcloneVolume ¶
type UnmountRequest ¶
type UnmountRequest struct {
MountPoint string `json:"mountPoint"`
}
type VfsOpt ¶
type VfsOpt struct {
NoSeek bool `json:",omitempty"` // don't allow seeking if set
NoChecksum bool `json:",omitempty"` // don't check checksums if set
ReadOnly bool `json:",omitempty"` // if set VFS is read only
NoModTime bool `json:",omitempty"` // don't read mod times for files
DirCacheTime string `json:",omitempty"` // how long to consider directory listing cache valid
Refresh bool `json:",omitempty"` // refreshes the directory listing recursively on start
PollInterval string `json:",omitempty"`
Umask int `json:",omitempty"`
UID uint32 `json:",omitempty"`
GID uint32 `json:",omitempty"`
DirPerms os.FileMode `json:",omitempty"`
FilePerms os.FileMode `json:",omitempty"`
ChunkSize string `json:",omitempty"` // if > 0 read files in chunks
ChunkSizeLimit string `json:",omitempty"` // if > ChunkSize double the chunk size after each chunk until reached
ChunkStreams int `json:",omitempty"`
CacheMode string `json:",omitempty"`
CacheMaxAge string `json:",omitempty"`
CacheMaxSize string `json:",omitempty"`
CacheMinFreeSpace string `json:",omitempty"`
CachePollInterval string `json:",omitempty"`
CaseInsensitive bool `json:",omitempty"`
WriteWait string `json:",omitempty"` // time to wait for in-sequence write
ReadWait string `json:",omitempty"` // time to wait for in-sequence read
WriteBack string `json:",omitempty"` // time to wait before writing back dirty files
ReadAhead string `json:",omitempty"` // bytes to read ahead in cache mode "full"
UsedIsSize bool `json:",omitempty"` // if true, use the `rclone size` algorithm for Used size
FastFingerprint bool `json:",omitempty"` // if set use fast fingerprints
DiskSpaceTotalSize string `json:",omitempty"`
}
VfsOpt is options for creating the vfs
Note that the `Daemon` option has been removed as it is not accepted for rc calls.
Click to show internal directories.
Click to hide internal directories.