Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(client scheduler.Scheduler_ReportPieceResultServer, worker IWorker, schedulerService *service.SchedulerService) *Client
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func NewGroup ¶
func NewGroup(cfg *config.Config, schedulerService *service.SchedulerService) *Group
func (*Group) ReceiveJob ¶
func (*Group) ReceiveUpdatePieceResult ¶
func (wg *Group) ReceiveUpdatePieceResult(pr *scheduler2.PieceResult)
type IWorker ¶
type IWorker interface { Serve() Stop() ReceiveJob(job *types.PeerTask) ReceiveUpdatePieceResult(pr *scheduler2.PieceResult) }
type SenderGroup ¶
type SenderGroup struct {
// contains filtered or unexported fields
}
func NewSender ¶
func NewSender(worker config.SchedulerWorkerConfig, schedulerService *service.SchedulerService) *SenderGroup
func (*SenderGroup) Send ¶
func (sg *SenderGroup) Send(peerTask *types.PeerTask)
func (*SenderGroup) Serve ¶
func (sg *SenderGroup) Serve()
func (*SenderGroup) Stop ¶
func (sg *SenderGroup) Stop()
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) ReceiveJob ¶
func (*Worker) ReceiveUpdatePieceResult ¶
func (w *Worker) ReceiveUpdatePieceResult(pr *scheduler2.PieceResult)
func (*Worker) UpdatePieceResult ¶
func (w *Worker) UpdatePieceResult(pr *scheduler2.PieceResult) (peerTask *types.PeerTask, needSchedule bool, err error)
Click to show internal directories.
Click to hide internal directories.