masterinslave

package
v3.0.0-...-3edb00a Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented = errors.New("this method of shadowed policy is not implemented")
)

Functions

func NewDriver

func NewDriver(master cluster.Node, handler driver.Handler, policy *model.Policy) driver.Handler

NewDriver 返回新的处理器

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver 影子存储策略,用于在从机端上传文件

func (Driver) CancelToken

func (handler Driver) CancelToken(ctx context.Context, uploadSession *serializer.UploadSession) error

取消上传凭证

func (*Driver) Delete

func (d *Driver) Delete(ctx context.Context, files []string) ([]string, error)

func (*Driver) Get

func (d *Driver) Get(ctx context.Context, path string) (response.RSCloser, error)

func (*Driver) List

func (d *Driver) List(ctx context.Context, path string, recursive bool) ([]response.Object, error)

func (*Driver) Put

func (d *Driver) Put(ctx context.Context, file fsctx.FileHeader) error

func (*Driver) Source

func (d *Driver) Source(ctx context.Context, path string, ttl int64, isDownload bool, speed int) (string, error)

func (*Driver) Thumb

func (d *Driver) Thumb(ctx context.Context, file *model.File) (*response.ContentResponse, error)

func (*Driver) Token

func (d *Driver) Token(ctx context.Context, ttl int64, uploadSession *serializer.UploadSession, file fsctx.FileHeader) (*serializer.UploadCredential, error)

Jump to

Keyboard shortcuts

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