queue

package
v0.0.0-...-ec09336 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStringAlreadyInQueue = errors.New("string already in queue")
)

Functions

This section is empty.

Types

type Queue

type Queue interface {
	Cleanup() error
	AddTask(string) error
	GetTask() (string, error)
	IsInQueue(string) (bool, error)
	MarkAsProcessed(string) error
	IsProcessed(string) (bool, error)
}

func Init

func Init() (Queue, error)

Init opens existing queue or creates a new one and returns the queue instance Don't forget to call defer queue.Cleanup() in appropriate place!

Jump to

Keyboard shortcuts

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