busruntime

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(ctx context.Context, job InboundJob) error

type InboundJob

type InboundJob interface {
	Bind(dst any) error
	PayloadBytes() []byte
}

InboundJob is the minimal job view the orchestration runtime needs from the queue layer.

type JobOptions

type JobOptions struct {
	Queue     string
	Delay     time.Duration
	Timeout   time.Duration
	Retry     int
	Backoff   time.Duration
	UniqueFor time.Duration
}

type Runtime

type Runtime interface {
	BusRegister(jobType string, handler Handler)
	BusDispatch(ctx context.Context, jobType string, payload []byte, opts JobOptions) error
	StartWorkers(ctx context.Context) error
	Shutdown(ctx context.Context) error
}

Runtime is the queue runtime surface required by the orchestration engine.

Jump to

Keyboard shortcuts

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