Help us shape the future of Go! Take the 2026 Go Developer Survey

worker

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageData added in v0.6.0

type MessageData struct {
	EventID    string `json:"event_id"`
	EndpointId string `json:"endpoint_id"`
	Attempt    int    `json:"attempt"`
	Event      string `json:"event"`
}

type Worker

type Worker struct {
	DB *db.DB
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(
	opts WorkerOptions,
	db *db.DB,
	deliverer deliverer.Deliverer,
	queue taskqueue.TaskQueue,
	metrics *metrics.Metrics,
	tracer *tracing.Tracer,
	bus eventbus.Bus) *Worker

func (*Worker) Start

func (w *Worker) Start() error

Start starts worker

func (*Worker) Stop

func (w *Worker) Stop() error

Stop stops worker

type WorkerOptions added in v0.3.0

type WorkerOptions struct {
	RequeueJobBatch    int
	RequeueJobInterval time.Duration
	PoolSize           int
	PoolConcurrency    int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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