mounter

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package mounter

Package mounter

Index

Constants

This section is empty.

Variables

View Source
var (
	MakeDir    = os.MkdirAll
	CreateFile = os.Create
	Chmod      = os.Chmod
	Stat       = os.Stat
	RemoveAll  = os.RemoveAll
)

Functions

This section is empty.

Types

type CSIMounterFactory

type CSIMounterFactory struct{}

func NewCSIMounterFactory

func NewCSIMounterFactory() *CSIMounterFactory

func (*CSIMounterFactory) NewMounter

func (s *CSIMounterFactory) NewMounter(attrib map[string]string, secretMap map[string]string, mountFlags []string, defaultMOMap map[string]string) Mounter

type FakeMounterFactory

type FakeMounterFactory struct {
	Mounter         string
	IsFailedMount   bool
	IsFailedUnmount bool
}

func (*FakeMounterFactory) NewMounter

func (f *FakeMounterFactory) NewMounter(attrib map[string]string, secretMap map[string]string, mountFlags []string, defaultParams map[string]string) Mounter

type Mounter

type Mounter interface {
	Mount(source string, target string) error
	Unmount(target string) error
}

func NewRcloneMounter

func NewRcloneMounter(secretMap map[string]string, mountOptions []string, mounterUtils utils.MounterUtils) Mounter

func NewS3fsMounter

func NewS3fsMounter(secretMap map[string]string, mountOptions []string, mounterUtils utils.MounterUtils, defaultParams map[string]string) Mounter

type NewMounterFactory

type NewMounterFactory interface {
	NewMounter(attrib map[string]string, secretMap map[string]string, mountFlags []string, defaultMOMap map[string]string) Mounter
}

type RcloneMounter

type RcloneMounter struct {
	BucketName    string //From Secret in SC
	ObjPath       string //From Secret in SC
	EndPoint      string //From Secret in SC
	LocConstraint string //From Secret in SC
	AuthType      string
	AccessKeys    string
	KpRootKeyCrn  string
	UID           string
	GID           string
	MountOptions  []string
	MounterUtils  utils.MounterUtils
}

Mounter interface defined in mounter.go rcloneMounter Implements Mounter

func (*RcloneMounter) Mount

func (rclone *RcloneMounter) Mount(source string, target string) error

func (*RcloneMounter) Unmount

func (rclone *RcloneMounter) Unmount(target string) error

type S3fsMounter

type S3fsMounter struct {
	BucketName    string //From Secret in SC
	ObjPath       string //From Secret in SC
	EndPoint      string //From Secret in SC
	LocConstraint string //From Secret in SC
	AuthType      string
	AccessKeys    string
	IAMEndpoint   string
	KpRootKeyCrn  string
	MountOptions  []string
	MounterUtils  utils.MounterUtils
}

Mounter interface defined in mounter.go s3fsMounter Implements Mounter

func (*S3fsMounter) Mount

func (s3fs *S3fsMounter) Mount(source string, target string) error

func (*S3fsMounter) Unmount

func (s3fs *S3fsMounter) Unmount(target string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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