pipe

package
v0.0.0-...-e613b9d Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorHandler

func ErrorHandler(ctx context.Context, err error) (returns bool)

ErrorHandler is an error handler with error level.

func FatalErrorHandler

func FatalErrorHandler(ctx context.Context, err error) (returns bool)

FatalErrorHandler is an error handler with fatal level.

func GetFanoutName

func GetFanoutName(
	ctx context.Context,
	fn func(InT) ([]OutT, error),
	fnErr func(context.Context, error) bool,
) (
	chan<- InT,
	<-chan OutT,
)

GetFanoutName returns new input(chan<- InT)/output(<-chan OutT) channels that embedded the given 'func(InT) OutT'.

func GetPipeName

func GetPipeName(
	ctx context.Context,
	fn func(InT) (OutT, error),
	fnErr func(context.Context, error) bool,
) (
	chan<- InT,
	<-chan OutT,
)

GetPipeName returns new input(chan<- InT)/output(<-chan OutT) channels that embedded the given 'func(InT) OutT'.

func Init

func Init(ctx context.Context)

Types

type InT

type InT generic.Type

InT is a placeholder for the genny.

type NameGetContexter

type NameGetContexter interface {
	GetContext() context.Context
}

type OutT

type OutT generic.Type

OutT is a placeholder for the genny.

Jump to

Keyboard shortcuts

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