smrqueue

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrQueueFull = errors.New("task queue full")
)

Functions

func NewModules

func NewModules() fx.Option

func NewQueue

func NewQueue() func(NewQueueParams) *Queue

Types

type NewQueueParams

type NewQueueParams struct {
	fx.In

	Logger      *logger.Logger
	RedisClient *datastore.Redis
}

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func (*Queue) AddTask

func (q *Queue) AddTask(taskInfo types.TaskInfo) error

func (*Queue) Count

func (q *Queue) Count() int

func (*Queue) FinishTask

func (q *Queue) FinishTask()

func (*Queue) GetTask

func (q *Queue) GetTask() (types.TaskInfo, error)

Jump to

Keyboard shortcuts

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