executor

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Start(ctx context.Context, params any) error
	Stop(wait bool) error
	Stats() *Stats
}

func New

func New(j job.Job, opts ...Option) Executor

type Option

type Option func(*executor)

func NoTimeout

func NoTimeout() Option

func Once

func Once() Option

func WithCooldown

func WithCooldown(cooldown time.Duration) Option

func WithRetry

func WithRetry(attempts uint, interval time.Duration) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

type Stats

type Stats struct {
	Retries  uint          `json:"retries"`
	Cooldown time.Duration `json:"cooldown"`
}

Jump to

Keyboard shortcuts

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