mounter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CosfsMounterType   = "cosfs"
	// OssfsMounterType   = "ossfs"
	// S3MounterType      = "s3fs"
	// GeesefsMounterType = "geesefs"
	CosfsCmd   = "cosfs"
	OssfsCmd   = "ossfs"
	S3FsCmd    = "s3fs"
	GeeseFsCmd = "geesefs"
)
View Source
const (
	TypeKey    = "mounter"
	BucketKey  = "bucket"
	OptionsKey = "options"
)

Variables

This section is empty.

Functions

func FuseUnmount

func FuseUnmount(path string) error

Types

type Config

type Config struct {
	AccessKeyID     string
	SecretAccessKey string
	Endpoint        string
	BucketName      string
	Mounter         string
	Region          string
	Meta            *FSMeta
}

Config holds values to configure the driver

type FSMeta

type FSMeta struct {
	// BucketName string `json:"BucketName"`
	Prefix string `json:"Prefix"`
	// Mounter       string   `json:"Mounter"`
	MountOptions  []string `json:"MountOptions"`
	CapacityBytes int64    `json:"CapacityBytes"`
}

type Mounter

type Mounter interface {
	Stage(stagePath string) error
	Unstage(stagePath string) error
	Mount(source string, target string) error
}

Mounter interface which can be implemented by the different mounter types

func New

func New(cfg *Config) (Mounter, error)

New returns a new mounter depending on the mounterType parameter

Jump to

Keyboard shortcuts

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