worker

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskHandler

type TaskHandler interface {
	HandleTask(ctx context.Context, newEvent event.ProcessedEvent) error
}

type Worker

type Worker struct {
	TaskHandler   TaskHandler
	EventsChannel <-chan event.ProcessedEvent
}

func NewWorker

func NewWorker(events <-chan event.ProcessedEvent, th TaskHandler) *Worker

func (*Worker) Run

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

Jump to

Keyboard shortcuts

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