task

package
v0.1.0-beta-3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IllegalSourceFileLen = -100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager is an implementation of the interface of TaskMgr.

func NewManager

func NewManager(cfg *config.Config, cdnMgr daemon.CDNMgr, progressMgr daemon.SeedProgressMgr) (*Manager, error)

NewManager returns a new Manager Object.

func (Manager) Delete

func (tm Manager) Delete(taskID string) error

func (*Manager) GC

func (tm *Manager) GC() error

func (Manager) Get

func (tm Manager) Get(taskID string) (*types.SeedTask, error)

func (Manager) GetAccessTime

func (tm Manager) GetAccessTime() (*syncmap.SyncMap, error)

func (*Manager) GetPieces

func (tm *Manager) GetPieces(ctx context.Context, taskID string) (pieces []*types.SeedPiece, err error)

func (*Manager) Register

func (tm *Manager) Register(ctx context.Context, req *types.TaskRegisterRequest) (pieceChan <-chan *types.SeedPiece, err error)

Jump to

Keyboard shortcuts

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