workers

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker interface {
	Name() string
	Run(ctx context.Context) error
}

type Workers

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

func NewWorkers

func NewWorkers(log *slog.Logger) *Workers

func (*Workers) Add

func (r *Workers) Add(w Worker) *Workers

func (*Workers) AddFunc

func (r *Workers) AddFunc(name string, run func(ctx context.Context) error) *Workers

func (*Workers) AllHealthy

func (r *Workers) AllHealthy() bool

func (*Workers) AnyCrashed

func (r *Workers) AnyCrashed() bool

func (*Workers) Drain

func (r *Workers) Drain(timeout time.Duration)

func (*Workers) Start

func (r *Workers) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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