eq_sequence

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DoOpt

type DoOpt func(o DoOpts) DoOpts

func ErrorHandler

func ErrorHandler(h eq_queue.ErrorListener) DoOpt

func SingleThread

func SingleThread() DoOpt

type DoOpts

type DoOpts struct {
	ErrorHandler eq_queue.ErrorListener
	SingleThread bool
}

func (DoOpts) Apply

func (z DoOpts) Apply(opts []DoOpt) DoOpts

type Sequence

type Sequence interface {
	// Do single stage
	Do(exec func(s Stage), opts ...DoOpt)

	// Do single stage, then returns next stage.
	DoThen(exec func(s Stage), opts ...DoOpt) Sequence
}

Batch sequence

func New

func New(opt ...eq_queue.Opt) Sequence

type Stage

type Stage interface {
	// Define function. This function must be called before Get.
	Define(queueId string, f interface{}, ctx ...interface{})

	// Get queue by id.
	Get(queueId string) eq_queue.Queue
}

Batch sequence stage:

Jump to

Keyboard shortcuts

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