tworker

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	Interval       time.Duration
	RestartOnError bool
}

Binding defines a background worker schedule.

func Every

func Every(d time.Duration) Binding

Every binds an action to run as a background worker continuously.

func (Binding) String

func (b Binding) String() string

type Transport

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

func New

func New() *Transport

func (*Transport) AsAction

func (t *Transport) AsAction() action.AnyAction

func (*Transport) CanHandle

func (t *Transport) CanHandle(b action.Binding) bool

func (*Transport) Do

func (t *Transport) Do(ctx context.Context, _ any) (any, error)

func (*Transport) Mount

func (t *Transport) Mount(actions []action.AnyAction)

func (*Transport) String

func (t *Transport) String() string

Jump to

Keyboard shortcuts

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