generic

package
v1.0.140 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retrying

func Retrying[HKTA, HKTSTATUS, A any](
	monadChain func(func(A) HKTA) func(HKTA) HKTA,
	monadChainStatus func(func(R.RetryStatus) HKTA) func(HKTSTATUS) HKTA,
	monadOf func(A) HKTA,
	monadOfStatus func(R.RetryStatus) HKTSTATUS,
	monadDelay func(time.Duration) func(HKTSTATUS) HKTSTATUS,

	policy R.RetryPolicy,
	action func(R.RetryStatus) HKTA,
	check func(A) bool,
) HKTA

Retry combinator for actions that don't raise exceptions, but signal in their type the outcome has failed. Examples are the `Option`, `Either` and `EitherT` monads.

policy - refers to the retry policy action - converts a status into an operation to be executed check - checks if the result of the action needs to be retried

Types

This section is empty.

Jump to

Keyboard shortcuts

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