Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v2.0.3
type Client interface { // RegisterPeerTask registers a peer into task. RegisterPeerTask(context.Context, *schedulerv1.PeerTaskRequest, ...grpc.CallOption) (*schedulerv1.RegisterResult, error) // ReportPieceResult reports piece results and receives peer packets. ReportPieceResult(context.Context, *schedulerv1.PeerTaskRequest, ...grpc.CallOption) (schedulerv1.Scheduler_ReportPieceResultClient, error) // ReportPeerResult reports downloading result for the peer. ReportPeerResult(context.Context, *schedulerv1.PeerResult, ...grpc.CallOption) error // A peer announces that it has the announced task to other peers. AnnounceTask(context.Context, *schedulerv1.AnnounceTaskRequest, ...grpc.CallOption) error // Checks if any peer has the given task. StatTask(context.Context, *schedulerv1.StatTaskRequest, ...grpc.CallOption) (*schedulerv1.Task, error) // LeaveTask releases peer in scheduler. LeaveTask(context.Context, *schedulerv1.PeerTarget, ...grpc.CallOption) error // AnnounceHost announces host to scheduler. AnnounceHost(context.Context, *schedulerv1.AnnounceHostRequest, ...grpc.CallOption) error // LeaveHost releases host in scheduler. LeaveHost(context.Context, *schedulerv1.LeaveHostRequest, ...grpc.CallOption) error // Close tears down the ClientConn and all underlying connections. Close() error }
Client is the interface for grpc client.
Click to show internal directories.
Click to hide internal directories.