service

package
v2.0.2-rc.26 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 16 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,
) *Service

New service instance

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 CDN 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

Jump to

Keyboard shortcuts

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