inmemorytaskmanager

package
v0.0.0-...-9b15e96 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 4 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 struct {
	// contains filtered or unexported fields
}

Queue represents an in-memory job queue.

func NewQueue

func NewQueue() *Queue

func (*Queue) Enqueue

func (q *Queue) Enqueue(pe event.ProcessedEvent) error

Enqueue adds a new job to the in-memory queue.

type TaskManager

type TaskManager struct {
	Queue *Queue
}

func New

func New() *TaskManager

func (*TaskManager) Publish

func (tm *TaskManager) Publish(e event.ProcessedEvent) error

type Worker

type Worker struct {
	TaskManager *TaskManager
	Handler     worker.TaskHandler
}

func NewWorker

func NewWorker(tm *TaskManager, h worker.TaskHandler) *Worker

func (*Worker) Run

func (w *Worker) Run(_ <-chan bool, _ *sync.WaitGroup) error

Jump to

Keyboard shortcuts

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