writer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flusher

type Flusher interface {
	Flush() (err error)
}

Flusher is the interface that wraps the basic Flush method.

Flush writes any buffered data to the underlying io.Writer.

type Writer

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

Writer implements batch writing for an io.Writer object.

func NewWriter

func NewWriter(writer io.Writer, concurrency func() int, size int, shared bool) *Writer

NewWriter returns a new batch Writer with the concurrency.

func (*Writer) Close

func (w *Writer) Close() (err error)

Close closes the writer, but do not close the underlying io.Writer

func (*Writer) Flush

func (w *Writer) Flush() error

Flush writes any buffered data to the underlying io.Writer.

func (*Writer) Write

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

Write writes the contents of p into the buffer or the underlying io.Writer. It returns the number of bytes written.

Jump to

Keyboard shortcuts

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