lib

package
v0.6.4-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2016 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomStagger

func RandomStagger(intv time.Duration) time.Duration

Returns a random stagger interval between 0 and the duration

func RateScaledInterval

func RateScaledInterval(rate float64, min time.Duration, n int) time.Duration

RateScaledInterval is used to choose an interval to perform an action in order to target an aggregate number of actions per second across the whole cluster.

func SeedMathRand

func SeedMathRand()

SeedMathRand provides weak, but guaranteed seeding, which is better than running with Go's default seed of 1. A call to SeedMathRand() is expected to be called via init(), but never a second time.

func StrContains

func StrContains(l []string, s string) bool

StrContains checks if a list contains a string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL