Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchingChannel ¶
type BatchingChannel struct {
// contains filtered or unexported fields
}
BatchingChannel implements the Channel interface, with the change that instead of producing individual elements on Out(), it batches together the entire internal buffer each time. Trying to construct an unbuffered batching channel will panic, that configuration is not supported (and provides no benefit over an unbuffered NativeChannel).
func NewBatchingChannel ¶
func (*BatchingChannel) Cap ¶
func (ch *BatchingChannel) Cap() int
func (*BatchingChannel) Close ¶
func (ch *BatchingChannel) Close()
func (*BatchingChannel) In ¶
func (ch *BatchingChannel) In() chan<- string
func (*BatchingChannel) Len ¶
func (ch *BatchingChannel) Len() int
func (*BatchingChannel) Out ¶
func (ch *BatchingChannel) Out() <-chan vector.Vector
Out returns a <-chan vector.Vector in order that BatchingChannel conforms to the standard Channel interface provided by this package, however each output value is guaranteed to be of type vector.Vector - a vector collecting the most recent batch of values sent on the In channel. The vector is guaranteed to not be empty or nil.
func (*BatchingChannel) ProcessOut ¶
func (ch *BatchingChannel) ProcessOut(f func(vector.Vector) error) error