Documentation ¶
Overview ¶
Package scheduler implements the Katzenpost server scheduler.
Index ¶
Constants ¶
const InboundPacketsChannelSize = 1000
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BatchingChannel ¶ added in v0.0.33
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 ¶ added in v0.0.33
func NewBatchingChannel(size BufferCap) *BatchingChannel
func (*BatchingChannel) Cap ¶ added in v0.0.33
func (ch *BatchingChannel) Cap() BufferCap
func (*BatchingChannel) Close ¶ added in v0.0.33
func (ch *BatchingChannel) Close()
func (*BatchingChannel) In ¶ added in v0.0.33
func (ch *BatchingChannel) In() chan<- interface{}
func (*BatchingChannel) Len ¶ added in v0.0.33
func (ch *BatchingChannel) Len() int
func (*BatchingChannel) Out ¶ added in v0.0.33
func (ch *BatchingChannel) Out() <-chan interface{}
Out returns a <-chan interface{} in order that BatchingChannel conforms to the standard Channel interface provided by this package, however each output value is guaranteed to be of type []interface{} - a slice collecting the most recent batch of values sent on the In channel. The slice is guaranteed to not be empty or nil. In practice the net result is that you need an additional type assertion to access the underlying values.