Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback interface { ScheduleParent(context.Context, *resource.Peer, set.SafeSet) BeginOfPiece(context.Context, *resource.Peer) EndOfPiece(context.Context, *resource.Peer) PieceSuccess(context.Context, *resource.Peer, *rpcscheduler.PieceResult) PieceFail(context.Context, *resource.Peer, *rpcscheduler.PieceResult) PeerSuccess(context.Context, *resource.Peer) PeerFail(context.Context, *resource.Peer) PeerLeave(context.Context, *resource.Peer) TaskSuccess(context.Context, *resource.Task, *rpcscheduler.PeerResult) TaskFail(context.Context, *resource.Task) }
type Service ¶
type Service interface { Scheduler() scheduler.Scheduler CDN() resource.CDN RegisterTask(context.Context, *rpcscheduler.PeerTaskRequest) (*resource.Task, error) LoadOrStoreHost(context.Context, *rpcscheduler.PeerTaskRequest) (*resource.Host, bool) LoadOrStorePeer(context.Context, *rpcscheduler.PeerTaskRequest, *resource.Task, *resource.Host) (*resource.Peer, bool) LoadPeer(string) (*resource.Peer, bool) HandlePiece(context.Context, *resource.Peer, *rpcscheduler.PieceResult) HandlePeer(context.Context, *resource.Peer, *rpcscheduler.PeerResult) HandlePeerLeave(ctx context.Context, peer *resource.Peer) }
Click to show internal directories.
Click to hide internal directories.