piece

package
v0.1.0-fix Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PieceStore

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

func NewPieceStore

func NewPieceStore(pieceConfig *storage.PieceStoreConfig) (*PieceStore, error)

NewPieceStore returns an instance of PieceStore

func (*PieceStore) Delete

func (p *PieceStore) Delete(ctx context.Context, key string) error

Delete one piece in PieceStore

func (*PieceStore) Get

func (p *PieceStore) Get(ctx context.Context, key string, offset, limit int64) (io.ReadCloser, error)

Get one piece from PieceStore

func (*PieceStore) GetPieceInfo

func (p *PieceStore) GetPieceInfo(ctx context.Context, key string) (storage.Object, error)

GetPieceInfo returns piece info in PieceStore

func (*PieceStore) Put

func (p *PieceStore) Put(ctx context.Context, key string, reader io.Reader) error

Put one piece to PieceStore

Jump to

Keyboard shortcuts

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