pipeline

package module
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aggregate added in v0.0.2

func Aggregate[K comparable, I1, I2, A any](ctx context.Context, in1 Aggregator[I1, K], in2 Aggregator[I2, K], aggFn func(K, I1, I2) A) chan A

func Aggregate3 added in v0.0.2

func Aggregate3[K comparable, I1, I2, I3, A any](ctx context.Context, in1 Aggregator[I1, K], in2 Aggregator[I2, K], in3 Aggregator[I3, K], aggFn func(K, I1, I2, I3) A) chan A

func FlatMap added in v0.0.11

func FlatMap[T any](ctx context.Context, in chan []T) chan T

func Map added in v0.0.12

func Map[I, O any](ctx context.Context, in chan I, f func(I) (O, error)) (chan O, chan error)

func Merge

func Merge[T any](ctx context.Context, chs ...chan T) <-chan T

Merge collects data from all input channels and send it to output channel.

All input and output channels have same type.

func Source

func Source[In any](ctx context.Context, in ...In) chan In

func Split added in v0.0.3

func Split[In, O1, O2 any](
	ctx context.Context,
	chIn <-chan In,
	sa1 *stepaction.StepAction[In, O1],
	sa2 *stepaction.StepAction[In, O2],
	opts ...StepOption,
) (chan O1, chan O2, chan error)

func Step

func Step[In, Out any](
	ctx context.Context,
	chIn <-chan In,
	stepAction *stepaction.StepAction[In, Out],
	opts ...StepOption,
) (chan Out, chan error)

func TestAggregate3 added in v0.0.2

func TestAggregate3(t *testing.T)

Types

type Aggregator added in v0.0.2

type Aggregator[I, K any] struct {
	Ch    chan I
	KeyFn func(I) K
}

type StepOption

type StepOption func(*stepConfig)

func WithLimit

func WithLimit(l int64) StepOption

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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