pipeline

package
v0.15.18 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline added in v0.15.18

type Pipeline[I any] func(*resources) <-chan I

func New

func New[I, O any, S State[I, O]](
	inputs Pipeline[I],
	concurrency int,
	state S,
) Pipeline[O]

func Source added in v0.15.18

func Source[I any](it iter.Seq[I]) Pipeline[I]

func (Pipeline[I]) Run added in v0.15.18

func (p Pipeline[I]) Run(ctx context.Context) (<-chan I, func() Result)

type Result added in v0.15.18

type Result struct {
	IsDone bool
	Err    error
}

type State

type State[I, O any] interface {
	Run(index int, input I, outputs chan<- O) error
	Done(index int, outputs chan<- O) error
}

Jump to

Keyboard shortcuts

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