worker

package
v0.117.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: AGPL-3.0 Imports: 36 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")
)
View Source
var ErrIsolationMissing = errors.New("isolation configuration is required for standby")
View Source
var ErrUnsupportedIsolation = errors.New("only Tart and Vetu instances are currently supported for standby")

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 WithStandby added in v0.113.0

func WithStandby(standby *StandbyConfig) Option

func WithUpstream added in v0.87.0

func WithUpstream(upstream *upstream.Upstream) Option

type StandbyConfig added in v0.113.0

type StandbyConfig struct {
	Isolation *api.Isolation
	Resources map[string]float64
}

func (*StandbyConfig) UnmarshalYAML added in v0.113.0

func (standby *StandbyConfig) UnmarshalYAML(value *yaml.Node) error

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