worker

package
v0.105.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInitializationFailed = errors.New("worker initialization failed")
	ErrShutdown             = errors.New("worker is shutting down")
)

Functions

This section is empty.

Types

type Option

type Option func(*Worker)

func WithLabels

func WithLabels(labels map[string]string) Option

func WithLogger added in v0.30.0

func WithLogger(logger logrus.FieldLogger) Option

func WithResources added in v0.79.0

func WithResources(resources map[string]float64) Option

func WithSecurity added in v0.102.0

func WithSecurity(security *security.Security) Option

func WithUpstream added in v0.87.0

func WithUpstream(upstream *upstream.Upstream) Option

type Task added in v0.87.0

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

type Worker

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

func New

func New(opts ...Option) (*Worker, error)

func (*Worker) Pause added in v0.77.0

func (worker *Worker) Pause(ctx context.Context, wait bool) error

func (*Worker) Resume added in v0.77.0

func (worker *Worker) Resume(ctx context.Context) (err error)

func (*Worker) Run

func (worker *Worker) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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