Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueuedChannel ¶
type QueuedChannel[T any] struct { // contains filtered or unexported fields }
QueuedChannel represents a channel on which queued items can be published without having to worry if the reader has actually consumed existing items first or if there's no way of knowing ahead of time what the ideal channel buffer size should be.
func NewQueuedChannel ¶
func NewQueuedChannel[T any](chanBufferSize, queueCapacity int) *QueuedChannel[T]
func (*QueuedChannel[T]) Close ¶
func (q *QueuedChannel[T]) Close()
func (*QueuedChannel[T]) CloseAndDiscardQueued ¶ added in v0.14.0
func (q *QueuedChannel[T]) CloseAndDiscardQueued()
CloseAndDiscardQueued force closes the channel and does not guarantee that the remaining queued items will be read.
func (*QueuedChannel[T]) Enqueue ¶
func (q *QueuedChannel[T]) Enqueue(items ...T) bool
func (*QueuedChannel[T]) GetChannel ¶
func (q *QueuedChannel[T]) GetChannel() <-chan T
Click to show internal directories.
Click to hide internal directories.