flow

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitExp

func AwaitExp(delay time.Duration) (delays []time.Duration)

func Retry

func Retry(
	ctx context.Context,
	duration time.Duration,
	retry func(i int, n int, d time.Duration) (err error),
) (err error)

func RetryT

func RetryT[T any](
	ctx context.Context,
	duration time.Duration,
	retry func(i int, n int, d time.Duration) (t T, err error),
) (t T, err error)

Types

type Input

type Input[T any] <-chan T

func From

func From[T any](in <-chan T) Input[T]

func Map

func Map[T1 any, T2 any](from <-chan T1, transform func(T1) (T2, bool)) (to Input[T2])

func (Input[T]) Debounce

func (f Input[T]) Debounce(t time.Duration) (input Input[T])

Jump to

Keyboard shortcuts

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