Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is buffered writer, which may be used in order to reduce overhead when sending moderately big responses to http server.
Writer methods can be called from concurrently running goroutines. The writer remembers the first occurred error, which can be inspected with Error method.
func Get ¶
Get returns buffered writer for the given w.
The writer must be returned to the pool after use by calling Put().
func (*Writer) Flush ¶
Flush flushes bw to the underlying writer.
Connection close errors are ignored to not trigger on them and to not write to logs, but Write method doesn't ignore them since it may lead to an unexpected behaviour (see https://github.com/VictoriaMetrics/VictoriaMetrics/pull/8157)