package
0.0.0-20220615103108-6a93a1912c7a
Repository: https://github.com/videocoin/common.git
Documentation: pkg.go.dev

# Functions

GetBackoffForNextSchedule calculates the backoff time for the next run given a cronSchedule, workflow start time and workflow close time.
GetBackoffForNextScheduleInSeconds calculates the backoff time in seconds for the next run given a cronSchedule and current time.
IgnoreErrors can be used as IsRetryable handler for Retry function to exclude certain errors from the retry list.
JitDuration return random duration from (1-coefficient)*duration to (1+coefficient)*duration, inclusive, exclusive.
JitFloat64 return random number from (1-coefficient)*input to (1+coefficient)*input, inclusive, exclusive.
JitInt64 return random number from (1-coefficient)*input to (1+coefficient)*input, inclusive, exclusive.
New makes a new Interface.
NewConcurrentRetrier returns an instance of concurrent backoff retrier.
NewExponentialRetryPolicy returns an instance of ExponentialRetryPolicy using the provided initialInterval.
NewMultiPhasesRetryPolicy creates MultiPhasesRetryPolicy.
NewRetrier is used for creating a new instance of Retrier.
Retry function can be used to wrap any call with retry logic using the passed in policy The returned error will be preferred to a previous one if one exists.
ValidateSchedule validates a cron schedule spec.

# Constants

NoBackoff is used to represent backoff when no cron backoff is needed.
NoInterval represents Maximim interval.

# Variables

SystemClock implements Clock interface that uses time.Now().

# Structs

No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
Interface does f in a loop, sleeping for initialBackoff between each iterations.
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author