service

package
v2.0.3-beta.5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func New

func New(
	cfg *config.Config,
	resource resource.Resource,
	scheduler scheduler.Scheduler,
	dynconfig config.DynconfigInterface,
	storage storage.Storage,
) *Service

New service instance.

func (*Service) AnnounceTask added in v2.0.3

func (s *Service) AnnounceTask(ctx context.Context, req *rpcscheduler.AnnounceTaskRequest) error

AnnounceTask informs scheduler a peer has completed task.

func (*Service) LeaveTask

func (s *Service) LeaveTask(ctx context.Context, req *rpcscheduler.PeerTarget) error

LeaveTask makes the peer unschedulable.

func (*Service) RegisterPeerTask

RegisterPeerTask registers peer and triggers seed peer download task.

func (*Service) ReportPeerResult

func (s *Service) ReportPeerResult(ctx context.Context, req *rpcscheduler.PeerResult) error

ReportPeerResult handles peer result reported by dfdaemon.

func (*Service) ReportPieceResult

func (s *Service) ReportPieceResult(stream rpcscheduler.Scheduler_ReportPieceResultServer) error

ReportPieceResult handles the piece information reported by dfdaemon.

func (*Service) StatTask added in v2.0.3

StatTask checks the current state of the task.

Jump to

Keyboard shortcuts

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