pipeline

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gen

func Gen[I any](inputs ...I) <-chan Result[I]

func Work

func Work[I any, O any](opts WorkOptions[I, O]) <-chan Result[O]

Types

type Result

type Result[I any] struct {
	Err  error
	Item *I
}

type WorkOptions

type WorkOptions[I any, O any] struct {
	Input          <-chan Result[I]
	Workers        int
	Process        func(I) (O, error)
	Name           string
	MetricsEnabled bool
}

Jump to

Keyboard shortcuts

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