clientwriter

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL