Documentation
¶
Overview ¶
Package outputlimit supplies New for private retained-output quotas, not codec allocation or atomic publication. Buffers are mutable and not concurrency-safe; Bytes aliases their storage. No external handles or workers are owned.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrLimit = errors.New("encoded output exceeds size limit")
ErrLimit identifies encoded output that exceeds its configured byte limit.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is an io.Writer that retains at most its configured byte limit.
func New ¶
New rejects negative configured limits and uses fallback when configured is zero. Callers must provide a nonnegative fallback; it is not validated here. Construction does not preallocate the entire quota.