worker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 42 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 WithLocalNetworkHelper added in v0.143.0

func WithLocalNetworkHelper(localNetworkHelper *localnetworkhelper.LocalNetworkHelper) Option

func WithLogger added in v0.30.0

func WithLogger(logger logrus.FieldLogger) Option

func WithResourceModifiersManager added in v0.122.0

func WithResourceModifiersManager(resourceModifiersManager *resourcemodifier.Manager) 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 *api.StandbyInstanceParameters) Option

func WithTartPrePull added in v0.129.0

func WithTartPrePull(tartPrePull *TartPrePull) Option

func WithTuning added in v0.155.0

func WithTuning(tuning *tuning.Tuning) Option

func WithUpstream added in v0.87.0

func WithUpstream(upstream *upstream.Upstream) Option

type StandbyConfig added in v0.113.0

type StandbyConfig struct {
	*api.StandbyInstanceParameters
}

func (*StandbyConfig) UnmarshalYAML added in v0.113.0

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

type TartPrePull added in v0.134.0

type TartPrePull struct {
	Images        []string      `yaml:"images"`
	CheckInterval time.Duration `yaml:"check-interval"`
	Jitter        time.Duration `yaml:"jitter"`
	LastCheck     time.Time
}

func (TartPrePull) NeedsPrePull added in v0.134.0

func (pull TartPrePull) NeedsPrePull() bool

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) Close added in v0.140.0

func (worker *Worker) Close() 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) error

func (*Worker) Run

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

func (*Worker) UpdateStandby added in v0.134.0

func (worker *Worker) UpdateStandby(ctx context.Context, parameters *api.StandbyInstanceParameters)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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