Documentation ¶
Index ¶
- type Writer
- func (b *Writer) Available() int
- func (b *Writer) Buffered() int
- func (b *Writer) Flush() error
- func (b *Writer) Reset(w io.Writer)
- func (b *Writer) Size() int
- func (b *Writer) Write(p []byte) (int, error)
- func (b *Writer) WriteHeader(buf []byte, hdr *header) (int, error)
- func (b *Writer) WriteV2(p []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer implements buffering for an io.Writer object. If an error occurs writing to a Writer, no more data will be accepted and all subsequent writes, and Flush, will return the error. After all data has been written, the client should call the Flush method to guarantee all data has been forwarded to the underlying io.Writer.
func NewWriterSize ¶
NewWriterSize returns a new Writer whose buffer has at least the specified size. If the argument io.Writer is already a Writer with large enough size, it returns the underlying Writer.
func (*Writer) Reset ¶
Reset discards any unflushed buffered data, clears any error, and resets b to write its output to w.
Click to show internal directories.
Click to hide internal directories.