Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Closure = func() func() { retryIn := 0 fibonacci := Fibonacci() return func() { if retryIn > 0 { durationString := fmt.Sprintf("%vs", retryIn) duration, _ := time.ParseDuration(durationString) log.WARNING.Printf("Retrying in %v seconds", retryIn) time.Sleep(duration) } retryIn = fibonacci() } }
Closure - a useful closure we can use when there is a problem connecting to the broker. It uses Fibonacci sequence to space out retry attempts
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.