worker

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImportJob

type ImportJob struct {
	Filename string
	UserID   int32
}

type Worker

type Worker struct {
	ImportQueue chan ImportJob
	DB          db.DB
	MBZ         mbz.MusicBrainzCaller
	Logger      *zerolog.Logger
	// contains filtered or unexported fields
}

func New

func New(db db.DB, mbz mbz.MusicBrainzCaller, l *zerolog.Logger) *Worker

func (*Worker) EnqueueImport

func (w *Worker) EnqueueImport(filename string, userID int32) bool

EnqueueImport adds a file to the processing queue. Returns true if enqueued, false if dropped.

func (*Worker) Start

func (w *Worker) Start()

func (*Worker) Stop

func (w *Worker) Stop()

Jump to

Keyboard shortcuts

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