Documentation
¶
Overview ¶
Package future implements the Future type.
Index ¶
- func After[A any](dur time.Duration, a A) warp.Future[A]
- func Alt[A any](x warp.Future[A], y warp.Future[A]) warp.Future[A]
- func Ap[A, B any](fab warp.Future[func(A) B], fa warp.Future[A]) warp.Future[B]
- func Attempt[A any](ra warp.Result[A], onPanic func(any) error) warp.Future[A]
- func AttemptForever[A any](ra warp.Result[A], onPanic func(any) error) warp.Future[A]
- func Chain[A, B any](ma warp.Future[A], f func(A) warp.Future[B]) warp.Future[B]
- func ChainEvent[A, B any](ma warp.Event[A], f func(A) warp.Future[B]) warp.Future[B]
- func Fail[A any](err error) warp.Future[A]
- func FailAfter[A any](dur time.Duration, err error) warp.Future[A]
- func Failure[A any](ea warp.Event[error]) warp.Future[A]
- func From[A any](as []A) warp.Future[A]
- func FromEvent[A any](fa warp.Event[A]) warp.Future[A]
- func FromResult[A any](fa warp.Result[A]) warp.Future[A]
- func FromResults[A any](fas []warp.Result[A]) warp.Future[A]
- func Map[A, B any](fa warp.Future[A], f func(A) B) warp.Future[B]
- func Parallel[A any](fas warp.Future[A], parallelism int) warp.Future[A]
- func Succeed[A any](a A) warp.Future[A]
- func Success[A any](ea warp.Event[A]) warp.Future[A]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Attempt ¶
Attempt converts a function which returns a (value, error) pair into a future that either succeeds with a value or fails with an error.
func AttemptForever ¶
func ChainEvent ¶
func Failure ¶
Failure creates a future which always fails with errors received from a source event.
func Parallel ¶
Parallel creates a Future which emits a stream of Results in parallel while keeping the sequence of output same as the order of input.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.