filesystem

package
v0.0.0-...-331262d Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(config Config, verbose bool) (*mountlib.MountPoint, error)

func NewFs

func NewFs(ctx context.Context, config Config) (fs.Fs, error)

Types

type Config

type Config struct {
	Client     *menmos.Client
	Profile    string                 `json:"profile"`
	Mountpoint string                 `json:"mount_point"`
	Mount      map[string]interface{} `json:"mount"`
}

A Config regroups configuration options.

type Filesystem

type Filesystem struct {
	Client *menmos.Client
	// contains filtered or unexported fields
}

Filesystem provides access to a menmos cluster.

func (*Filesystem) Features

func (f *Filesystem) Features() *fs.Features

Features returns the supported features of this filesystem.

func (*Filesystem) Hashes

func (f *Filesystem) Hashes() hash.Set

Hashes returns the supported hash types of this filesystem.

func (*Filesystem) List

func (f *Filesystem) List(ctx context.Context, dir string) (entries fs.DirEntries, err error)

func (*Filesystem) Mkdir

func (f *Filesystem) Mkdir(ctx context.Context, dir string) error

func (*Filesystem) Move

func (f *Filesystem) Move(ctx context.Context, src fs.Object, remote string) (fs.Object, error)

func (*Filesystem) Name

func (f *Filesystem) Name() string

Name returns the name of the remote.

func (*Filesystem) NewObject

func (f *Filesystem) NewObject(ctx context.Context, remote string) (fs.Object, error)

func (*Filesystem) Precision

func (f *Filesystem) Precision() time.Duration

Precision returns the timestamp precision of the filesystem. For Menmos, this is seconds.

func (*Filesystem) Put

func (f *Filesystem) Put(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error)

func (*Filesystem) Rmdir

func (f *Filesystem) Rmdir(ctx context.Context, dir string) error

func (*Filesystem) Root

func (f *Filesystem) Root() string

Root returns the mounted filesystem root.

func (*Filesystem) String

func (f *Filesystem) String() string

String returns a description of the FS

Jump to

Keyboard shortcuts

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