async

package
v0.0.0-...-bdf525e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Async

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

func New

func New(cfg *config.Config) (*Async, error)

func (*Async) Do

func (a *Async) Do(ctx context.Context, job Job) error

func (*Async) Handler

func (a *Async) Handler(dispatch Dispatch) http.HandlerFunc

type Dispatch

type Dispatch func(context.Context, Message) error

type Job

type Job interface {
	Name() string
}

type Message

type Message struct {
	Name    string
	Payload []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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