Documentation
¶
Overview ¶
Package buffer provides a sync.Pool-backed implementation of httputil.BufferPool for reusing byte slices, aiming to save memory and reduce GC pressure when dealing with large response bodies.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool implements httputil.Pool backed by a sync.Pool internally. It reduces allocations for large response bodies by reusing byte slices, thus lowering GC pressure.
Click to show internal directories.
Click to hide internal directories.