provider

package
v0.0.0-...-f65cdbb Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxItems = 100

Variables

View Source
var ErrQueueEmpty = errors.New("queue empty")

Functions

This section is empty.

Types

type FileQueue

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

func NewFileQueue

func NewFileQueue[T any](dir string, id string) (*FileQueue[T], error)

func (*FileQueue[T]) Add

func (f *FileQueue[T]) Add(data T) error

func (*FileQueue[T]) Remove

func (f *FileQueue[T]) Remove() ([]T, error)

type MemBasedQueue

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

func NewMemBasedQueue

func NewMemBasedQueue[T any]() (*MemBasedQueue[T], error)

func (*MemBasedQueue[T]) Add

func (f *MemBasedQueue[T]) Add(data T) error

func (*MemBasedQueue[T]) Remove

func (f *MemBasedQueue[T]) Remove() ([]T, error)

type Queue

type Queue[T any] interface {
	Add(data T) error
	Remove() ([]T, error)
}

Jump to

Keyboard shortcuts

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