Documentation
¶
Index ¶
- func AsOutputChannel[T any](ch *DynamicChannel[T]) (chan T, func(context.Context))
- type DynamicChannel
- func (dch *DynamicChannel[T]) Dequeue(ctx context.Context) (*T, error)
- func (dch *DynamicChannel[T]) DequeueNonblock() *T
- func (dch *DynamicChannel[T]) Enqueue(ctx context.Context, d T) error
- func (dch *DynamicChannel[T]) EnqueueNonblock(d T)
- func (dch *DynamicChannel[T]) Peek() *T
- func (dch *DynamicChannel[T]) Size() int
- func (dch *DynamicChannel[T]) Slice() []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsOutputChannel ¶
func AsOutputChannel[T any]( ch *DynamicChannel[T], ) (chan T, func(context.Context))
Types ¶
type DynamicChannel ¶
type DynamicChannel[T any] struct { // contains filtered or unexported fields }
TODO: Need to find a way to use Deque[claim] instead of Deque[*claim]
func New ¶
func New[T any]() *DynamicChannel[T]
func NewWithMutex ¶
func NewWithMutex[T any](mx *sync.RWMutex) *DynamicChannel[T]
func (*DynamicChannel[T]) Dequeue ¶
func (dch *DynamicChannel[T]) Dequeue(ctx context.Context) (*T, error)
func (*DynamicChannel[T]) DequeueNonblock ¶
func (dch *DynamicChannel[T]) DequeueNonblock() *T
func (*DynamicChannel[T]) Enqueue ¶
func (dch *DynamicChannel[T]) Enqueue(ctx context.Context, d T) error
func (*DynamicChannel[T]) EnqueueNonblock ¶
func (dch *DynamicChannel[T]) EnqueueNonblock(d T)
func (*DynamicChannel[T]) Peek ¶
func (dch *DynamicChannel[T]) Peek() *T
func (*DynamicChannel[T]) Size ¶
func (dch *DynamicChannel[T]) Size() int
func (*DynamicChannel[T]) Slice ¶
func (dch *DynamicChannel[T]) Slice() []T
Click to show internal directories.
Click to hide internal directories.