Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBeginOfPiece ¶ added in v2.0.2
func NewBeginOfPiece(taskID, peerID string) *scheduler.PieceResult
func NewEndOfPiece ¶ added in v2.0.2
func NewEndOfPiece(taskID, peerID string, finishedCount int32) *scheduler.PieceResult
Types ¶
type PeerPacketStream ¶
type PeerPacketStream interface { Recv() (pp *scheduler.PeerPacket, err error) Send(pr *scheduler.PieceResult) (err error) }
type SchedulerClient ¶
type SchedulerClient interface { // RegisterPeerTask register peer task to scheduler RegisterPeerTask(context.Context, *scheduler.PeerTaskRequest, ...grpc.CallOption) (*scheduler.RegisterResult, error) // ReportPieceResult IsMigrating of ptr will be set to true ReportPieceResult(context.Context, string, *scheduler.PeerTaskRequest, ...grpc.CallOption) (PeerPacketStream, error) ReportPeerResult(context.Context, *scheduler.PeerResult, ...grpc.CallOption) error LeaveTask(context.Context, *scheduler.PeerTarget, ...grpc.CallOption) error StatTask(context.Context, *scheduler.StatTaskRequest, ...grpc.CallOption) (*scheduler.Task, error) AnnounceTask(context.Context, *scheduler.AnnounceTaskRequest, ...grpc.CallOption) error UpdateState([]dfnet.NetAddr) GetState() []dfnet.NetAddr Close() error }
SchedulerClient see scheduler.SchedulerClient
func GetClientByAddr ¶
func GetClientByAddr(addrs []dfnet.NetAddr, opts ...grpc.DialOption) (SchedulerClient, error)
Click to show internal directories.
Click to hide internal directories.