files

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFileIoChain

func InitFileIoChain(cfg config.Config, s storage.Storage, stopCh chan struct{})

Types

type Attr

type Attr struct {
	Read   bool
	Write  bool
	Create bool
	Trunc  bool
	Direct bool
	Meta   storage.MetaStore
}

type File

type File interface {
	GetObject() *types.Object
	Write(ctx context.Context, data []byte, offset int64) (n int64, err error)
	Read(ctx context.Context, data []byte, offset int64) (int, error)
	Fsync(ctx context.Context) error
	Flush(ctx context.Context) (err error)
	Close(ctx context.Context) (err error)
}

func Open

func Open(ctx context.Context, obj *types.Object, attr Attr) (File, error)

func OpenStructured

func OpenStructured(ctx context.Context, obj *types.Object, spec interface{}, attr Attr) (File, error)

Jump to

Keyboard shortcuts

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