insidegeneric

package
v0.0.0-...-4cdfe95 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinMany

func JoinMany[T any](producers ...Producer[T]) ([]T, error)

JoinMany runs the given producers and returns a slice of their results in-order.

func JoinTwo

func JoinTwo[A, B, C any](
	pa Producer[A],
	pb Producer[B],
	fn func(A, B) C,
) (C, error)

JoinTwo combines two producers producing different values using the provided function.

Types

type Producer

type Producer[T any] func(context.Context) (T, error)

Producer is a function that produces a value of the given type.

Jump to

Keyboard shortcuts

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