fio

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TmpFileMask added in v0.2.5

func TmpFileMask(callback func())

Types

type BucketConfig added in v0.2.5

type BucketConfig struct {
	Quota *int64 // 配额 (单位mb)
	Vers  *bool  // 是否开启版本控制
}

type BucketStat added in v0.2.5

type BucketStat struct {
	Quota int64  // 配额 (单位mb)
	Vers  bool   // 是否开启版本控制
	Size  uint64 // 文件大小 (字节)
	Files uint64 // 文件数量
}

type IFile

type IFile interface {
	io.Reader
	io.Writer
	io.Closer
}

type IFileBucket added in v0.2.5

type IFileBucket interface {
	Bucket() string
	Info() (stat BucketStat, err error)
	SetConfig(conf BucketConfig) (err error)
	List(path string) ([]os.FileInfo, error)
	Open(name string) (io.ReadSeekCloser, error)
	OpenFile(name string) (IFile, error)
	MergeFile(ctx context.Context, dst MergeOption, src ...MergeOption) (IFileStat, error)
	Stat(name string) (IFileStat, error)
	Remove(name string) error
}

type IFileStat added in v0.2.22

type IFileStat interface {
	os.FileInfo
	Sha1() string
}

type IFileSystem

type IFileSystem interface {
	IsOnline() bool
	Bucket(name string) (IFileBucket, error)
}

默认使用本地文件系统(以后需要被 minio相关实现覆盖)

var FileSystem IFileSystem

type MergeOption added in v0.2.23

type MergeOption struct {
	Path string
}

type MinIO added in v0.2.5

type MinIO struct {
	Endpoint string
	Access   string
	Secret   string
	Secure   bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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