Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 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.