Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Jitter ¶
Jitter takes a duration <param: delta> and a dividing factor <param: factor> and returns a func that makes the current thread sleep for a random amount in range delta/[1...factor]
Ex: delta: 10s factor: 10 => sleep can be anything from 1 sec to 10 sec.
delta: 10s factor: 20 => sleep can be anything from .5 sec to 10 sec. delta: 10s factor: 100 => sleep can be anything from .1 sec to 10 sec.
Min sleep time is 10MS. We are implementing something similar to equal jitter (as we don't have backoff, there's no memory). But following the philosophy of equal jitter and not allowing a very small sleep time.
func RegisterMigration ¶
func RegisterMigration(migration ...string)
Types ¶
Click to show internal directories.
Click to hide internal directories.