executor

package
v0.0.0-...-02c76fb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 1 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

type Pipeline struct {
	CallStack []PipelineFunc
}

Pipeline is a type alias for a lazy list of pipeline functions

func NewPipeline

func NewPipeline() Pipeline

NewPipeline creats a new Pipeline with an empty call stack

func (Pipeline) AndThen

func (p Pipeline) AndThen(f PipelineFunc) Pipeline

AndThen is a utility function that converts a PipelineFunc into a MonadicPipelineFunc before adding it to the execution list as part of the refactor to remove Either from pipeline processing.

func (Pipeline) Connect

func (p Pipeline) Connect(end Pipeline) Pipeline

Connect adds a pipeline to the end of the current pipeline. E.g. {a,b,c}.Connect({d,e,f}) = {a,b,c,d,e.f}

func (Pipeline) Exec

func (p Pipeline) Exec(ctx context.Context, zeroValue interface{}) (interface{}, error)

Exec executes the pipeline

type PipelineFunc

type PipelineFunc func(context.Context, interface{}) (interface{}, error)

PipelineFunc represents a pipelined function that uses multi-return instead of either.

type Status

type Status interface {
	Error() error
}

Status represents an executor node that can provide status

Jump to

Keyboard shortcuts

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