multistream

package
v0.0.0-...-d005cba Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) Next

func (r *Reader) Next() error

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) Next

func (w *Writer) Next()

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Writes a chunk to the output stream. This method is going to yield a frame. Therefore, it is a good idea to use a buffered writer:

msw := multistream.NewWriter(dest)
outpt := bufio.NewWriterSize(msw,1<<20) // 1MB buffer or more.

Jump to

Keyboard shortcuts

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