Documentation ¶
Index ¶
- type Service
- func (s *Service) LeaveTask(ctx context.Context, req *rpcscheduler.PeerTarget) error
- func (s *Service) RegisterPeerTask(ctx context.Context, req *rpcscheduler.PeerTaskRequest) (*rpcscheduler.RegisterResult, error)
- func (s *Service) ReportPeerResult(ctx context.Context, req *rpcscheduler.PeerResult) error
- func (s *Service) ReportPieceResult(stream rpcscheduler.Scheduler_ReportPieceResultServer) error
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 ¶
func (s *Service) RegisterPeerTask(ctx context.Context, req *rpcscheduler.PeerTaskRequest) (*rpcscheduler.RegisterResult, error)
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
Click to show internal directories.
Click to hide internal directories.