Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuffTee ¶
BuffTee is a Go package that buffers stream data and makes it available for multiple readers. Readers will start to receive data as soon as it appears in the buffer. Writing and reading can be performed on separate subroutines.
func NewBuffTee ¶
func NewBuffTee(cancelChan <-chan struct{}) *BuffTee
NewBuffTee creates new BuffTee instance. cancelChan - a channel that when it is closed it signals that transmission is aborted.
func (*BuffTee) Close ¶
Close signals to all readers that at this point is EOF. Marks that transmission successfully finished.
func (*BuffTee) Memory ¶
Memory returns memory amount occupied by the buffer. Returned value is always greater that data size itself.
Click to show internal directories.
Click to hide internal directories.