Documentation
¶
Overview ¶
Package iox holds small io helpers shared by the gateway packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TailBuffer ¶
type TailBuffer struct {
Limit int
// contains filtered or unexported fields
}
TailBuffer is an io.Writer that keeps only the last Limit bytes written. It never returns an error, so it is safe to use as a child process sink. A zero or negative Limit discards everything.
func NewTailBuffer ¶
func NewTailBuffer(limit int) *TailBuffer
NewTailBuffer returns a TailBuffer that keeps at most limit bytes.