Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientWriter ¶
type ClientWriter interface { // WriteData writes the distribution data from other peers, it may be called more times. PutData(data protocol.DistributionData) error // Run starts the loop and ClientWriter will write request data to wc. // Run should only be called once. // caller gets the result by Notify. Run(ctx context.Context, wc io.WriteCloser) (basic.Notify, error) }
ClientWriter defines how to organize distribution data for range request. An instance binds to a range request. It may receive a lot of distribution data. Developer could call Run() to start the loop in which ClientWriter will write request data to io.Writer.
Click to show internal directories.
Click to hide internal directories.