Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type D ¶
type D interface { Set(time.Duration) time.Duration Wait() NextWaitTime() time.Duration Get() time.Duration }
D (Delay) makes it easy to add (threadsafe) configurable delays to other objects.
func VariableNormal ¶
VariableNormal is a delay following a normal distribution Notice that to implement the D interface Set can only change the mean delay the standard deviation is set only at initialization
type Generator ¶
Generator provides an interface for generating wait times
func FixedGenerator ¶
func FixedGenerator() Generator
FixedGenerator returns a delay with fixed latency
func VariableNormalGenerator ¶
VariableNormalGenerator makes delays that following a normal distribution
Click to show internal directories.
Click to hide internal directories.