Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBatchSize = 512
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LimitWriter ¶ added in v1.2.1
type LimitWriter struct {
W io.Writer
N int // bytes remaining that can be written
D int // bytes dropped so far
}
LimitWriter is a writer that limits the number of bytes written to it.
type LinePrefixer ¶ added in v1.2.1
LinePrefixer is a writer that prefixes each line written to it with a prefix.
func (*LinePrefixer) Close ¶ added in v1.2.1
func (l *LinePrefixer) Close() error
type SizeLimitedWriter ¶ added in v1.8.1
type SizeLimitedWriter struct {
SizeTrackingWriter
Limit uint64
}
type SizeTrackingWriter ¶ added in v1.6.0
func (*SizeTrackingWriter) Size ¶ added in v1.6.0
func (w *SizeTrackingWriter) Size() uint64
Size returns the number of bytes written to the writer. The value is fundamentally racy only consistent if synchronized with the writer or closed.
Click to show internal directories.
Click to hide internal directories.