taskqueue

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue interface {
	StoreTask(task *models.Task)
	GetTask(imageUrl string) (*models.Task, error)
	ReadQueue() []*models.Task
	GetDistinctImageList() []string
	BulkRemove(tasks []*models.Task)
	Pop() (*models.Task, bool)
	PeakForNextTask() (*models.Task, bool)
}

Queue is a special datastructure.Queue implementation that will not fully remove models.Task once popped. Instead, It will still be stored in internal datastructure.Buffer to make sure that no task is lost during the task distribution process.

func ProvideTaskQueue

func ProvideTaskQueue(meter metric.Meter) Queue

Jump to

Keyboard shortcuts

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