bzqueue

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IQueue

type IQueue interface {
	EnQueue(ctx context.Context, data any) error
	DeQueue(ctx context.Context) (data any, err error)
	IsFull() bool
	IsEmpty() bool
	Len() uint64
}

type Queue

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

func New

func New[T any](maxSize int) *Queue[T]

func (*Queue[T]) DeQueue

func (q *Queue[T]) DeQueue(ctx context.Context) (data T, err error)

func (*Queue[T]) EnQueue

func (q *Queue[T]) EnQueue(ctx context.Context, data T) error

func (*Queue[T]) IsEmpty

func (q *Queue[T]) IsEmpty() bool

func (*Queue[T]) IsFull

func (q *Queue[T]) IsFull() bool

func (*Queue[T]) Len

func (q *Queue[T]) Len() uint64

Jump to

Keyboard shortcuts

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