queue

package
v0.0.0-...-56c857f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelQueue

type ChannelQueue[T any] struct {
	// contains filtered or unexported fields
}

func NewChannelQueue

func NewChannelQueue[T any](channel chan T) *ChannelQueue[T]

func (*ChannelQueue[T]) Close

func (q *ChannelQueue[T]) Close()

func (*ChannelQueue[T]) Get

func (q *ChannelQueue[T]) Get() (T, error)

func (*ChannelQueue[T]) Put

func (q *ChannelQueue[T]) Put(item T) error

func (*ChannelQueue[T]) Size

func (q *ChannelQueue[T]) Size() (int64, error)

type Queue

type Queue[T any] interface {
	Put(item T) error
	Get() (T, error)
	Size() (int64, error)
	Close()
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL