pipeline

package module
v0.0.0-...-bb626d1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Processing = iota
	PipelineError
	Completed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Value  interface{}
	Status PipelineStatus
}

func NewData

func NewData(value interface{}, status PipelineStatus) *Data

type OnComplete

type OnComplete = func()

type OnData

type OnData = func(value interface{})

type OnError

type OnError = func(err error)

type Pipeline

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

func FromChannel

func FromChannel(in chan interface{}) *Pipeline

func FromProducer

func FromProducer(producer Producer) *Pipeline

func Just

func Just(values ...interface{}) *Pipeline

func (*Pipeline) Block

func (p *Pipeline) Block() ([]interface{}, error)

func (*Pipeline) Close

func (p *Pipeline) Close()

func (*Pipeline) Pipe

func (p *Pipeline) Pipe(stage Stage) *Pipeline

func (*Pipeline) Subscribe

func (p *Pipeline) Subscribe(onData OnData, onError OnError, onComplete OnComplete)

type PipelineStatus

type PipelineStatus = uint8

type Producer

type Producer = func(chan *Data)

type Stage

type Stage = func(value interface{}) (interface{}, error)

Directories

Path Synopsis
examples
block command
fromChannel command
fromProducer command
just command
subscribe command

Jump to

Keyboard shortcuts

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