jobs

package
v0.0.0-...-c71315a Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOrchestratorStopped              error
	ErrOrchestratorTimeout              error
	ErrOrchestratorUnknownHandler       error
	ErrOrchestratorUndefinedConcurrency error
)

Functions

func NewBackgroundOrchestrator

func NewBackgroundOrchestrator(name string) a.Component

Types

type Orchestrator

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

func NewOrchestrator

func NewOrchestrator(name string) *Orchestrator

func (*Orchestrator) Handle

func (o *Orchestrator) Handle(ctx context.Context, t Task) (Task, error)

func (*Orchestrator) Shutdown

func (o *Orchestrator) Shutdown(ctx context.Context) error

func (*Orchestrator) Start

func (o *Orchestrator) Start(ctx context.Context) error

func (*Orchestrator) WithHandler

func (o *Orchestrator) WithHandler(h TaskHandler, t reflect.Type) *Orchestrator

func (*Orchestrator) WithLogger

func (o *Orchestrator) WithLogger(l *slog.Logger) *Orchestrator

type Task

type Task interface {
	Type() reflect.Type
}

type TaskHandler

type TaskHandler interface {
	Type() reflect.Type
	Handle(ctx context.Context, t Task) (Task, error)
	MaxConcurrent() int
}

Jump to

Keyboard shortcuts

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