worker

package
v0.0.0-...-ed82f56 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartQueueWorkers

func StartQueueWorkers(concurrency int, queue *storage.Queue) (consumers []*nsq.Consumer, err error)

func StartWorkers

func StartWorkers(urlListURL string, urlListCachePath string, parquetDir string, wg *sync.WaitGroup, concurrency int) error

Types

type QueueWorker

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

func (*QueueWorker) HandleMessage

func (worker *QueueWorker) HandleMessage(message *nsq.Message) error

type Worker

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

func NewWorker

func NewWorker(id int, wg *sync.WaitGroup) (*Worker, error)

func (*Worker) HandleUrl

func (worker *Worker) HandleUrl(targetURL string) error

func (*Worker) Work

func (worker *Worker) Work() error

Jump to

Keyboard shortcuts

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