Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrClosed = errors.New("writer already closed") ErrLimitExceeded = errors.New("writer exceeded available space") )
errors ...
Functions ¶
This section is empty.
Types ¶
type DonePool ¶
type DonePool struct {
// contains filtered or unexported fields
}
DonePool exists to contain multiple RangePool that lies within giving distance range. It creates a internal array of DonePool which are distanced between each other by provided distance. Whenever giving call to get a bytes.Buffer for a giving size is within existing pool distances, it calls that RangePool responsible for that size and retrieves giving bytes.Buffer from that pool. If no range as such exists, it creates a new RangePool for the size + DonePool.Distance set an instantiation, then retrieves a bytes.Buffer from that.
func NewDonePool ¶
NewDonePool returns a new instance of a DonePool with size distance used for new pools and creates as many as the initialAmount of RangePools internally to service those size requests.