Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultRetrierDelay = 10 * time.Second
DefaultRetrierDelay default retrier baseDelay
Variables ¶
This section is empty.
Functions ¶
func ImmediateTicker ¶
ImmediateTicker is a wrapper around time.Ticker that ticks an extra time during its creation before starting to tick on every `duration`. The reason for adding it is for multiple services that use the ticker, to be able to run their logic a single time before waiting for the `duration` to elapse. This allows for faster execution.
func ParseAddrInfos ¶
ParseAddrInfos converts strings to AddrInfos
func TrapSignal ¶
func TrapSignal(logger tmlog.Logger, cancel context.CancelFunc)
TrapSignal will listen for any OS signal and cancel the context to gracefully exit.
Types ¶
type Retrier ¶
type Retrier struct {
// contains filtered or unexported fields
}
Retrier handles retries of failed services.
func NewRetrier ¶
func (Retrier) NextTick ¶
NextTick calculates the next exponential tick based on the provided retry count and the initialized base delay.
Click to show internal directories.
Click to hide internal directories.