mounter

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 20 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

func GetKnownS3FSOptions added in v0.12.43

func GetKnownS3FSOptions() *pkgutils.Set

GetKnownS3FSOptions returns a Set of known s3fs mount option names used to classify options as known (standard s3fs) or unknown (custom for addMountParam)

Types

type CSIMounterFactory

type CSIMounterFactory struct{}

func NewCSIMounterFactory

func NewCSIMounterFactory() *CSIMounterFactory

func (*CSIMounterFactory) NewMounter

func (s *CSIMounterFactory) NewMounter(params MounterParams) Mounter

type FakeMounterFactory

type FakeMounterFactory struct {
	Mounter         string
	IsFailedMount   bool
	IsFailedUnmount bool
}

func (*FakeMounterFactory) NewMounter

func (f *FakeMounterFactory) NewMounter(params MounterParams) Mounter

type Mounter

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

func NewRcloneMounter

func NewRcloneMounter(params RcloneMounterParams) Mounter

func NewS3fsMounter

func NewS3fsMounter(params S3fsMounterParams) Mounter

type MounterParams added in v1.0.6

type MounterParams struct {
	Attrib           map[string]string
	SecretMap        map[string]string
	MountFlags       []string
	KnownS3FSOptions *pkgutils.Set
	DefaultMOMap     map[string]string
	Gid              string
	ReadOnly         bool
}

type NewMounterFactory

type NewMounterFactory interface {
	NewMounter(params MounterParams) Mounter
}

type RcloneMounter

type RcloneMounter struct {
	BucketName    string //From Secret in SC
	ObjectPath    string //From Secret in SC
	EndPoint      string //From Secret in SC
	LocConstraint string //From Secret in SC
	AuthType      string
	AccessKeys    string

	KpRootKeyCrn string
	IAMEndpoint  string
	UID          string
	GID          string
	ReadOnly     bool
	MountOptions []string
	MounterUtils utils.MounterUtils
	// contains filtered or unexported fields
}

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 RcloneMounterParams added in v1.0.6

type RcloneMounterParams struct {
	SecretMap    map[string]string
	MountOptions []string
	MounterUtils utils.MounterUtils
	Gid          string
	ReadOnly     bool
}

type S3fsMounter

type S3fsMounter struct {
	BucketName    string //From Secret in SC
	ObjectPath    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
	AddMountParam 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

type S3fsMounterParams added in v1.0.6

type S3fsMounterParams struct {
	SecretMap        map[string]string
	MountOptions     []string
	MounterUtils     utils.MounterUtils
	KnownS3FSOptions *pkgutils.Set
	DefaultParams    map[string]string
	Gid              string
	ReadOnly         bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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