task

package
v2.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 supervisor.CDNMgr, progressMgr supervisor.SeedProgressMgr) (*Manager, error)

NewManager returns a new Manager Object.

func (Manager) Delete

func (tm Manager) Delete(taskID string) error

func (Manager) Exist

func (tm Manager) Exist(taskID string) (*types.SeedTask, bool)

func (*Manager) GC

func (tm *Manager) GC() error

func (Manager) Get

func (tm Manager) Get(taskID string) (*types.SeedTask, 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