fs

package
v0.0.0-...-9a1563a Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(cfg *Config) ([]common.DiskIF, error)

Types

type Config

type Config struct {
	Dir  string `yaml:"dir"`
	Host string `yaml:"host"`
}

type Disk

type Disk struct {
	*proto.Disk
}

func (*Disk) Delete

func (d *Disk) Delete(ctx context.Context, fd string) error

func (*Disk) Get

func (d *Disk) Get(ctx context.Context, fd string) (io.ReadCloser, error)

func (*Disk) Init

func (d *Disk) Init(ctx context.Context, label *proto.DiskLabel) error

func (*Disk) Put

func (d *Disk) Put(ctx context.Context, fd string, data io.ReadCloser) error

func (*Disk) Stat

func (d *Disk) Stat(ctx context.Context) (*proto.Disk, error)

Jump to

Keyboard shortcuts

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