worker

package
v0.1.47 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIN_PORT = 8001
	MAX_PORT = 8100
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name       string
	Address    string
	Broker     mq.Broker
	Runtime    runtime.Runtime
	Queues     map[string]int
	Limits     Limits
	Middleware []task.MiddlewareFunc
}

type Limits

type Limits struct {
	DefaultCPUsLimit   string
	DefaultMemoryLimit string
}

type Worker

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

func NewWorker

func NewWorker(cfg Config) (*Worker, error)

func (*Worker) Start

func (w *Worker) Start() error

func (*Worker) Stop

func (w *Worker) Stop() error

Jump to

Keyboard shortcuts

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