package
0.0.0-20140721202556-2b2087e3d869
Repository: https://github.com/joinhack/cockroach.git
Documentation: pkg.go.dev
# Functions
ContainsSameElements compares, without taking order on the first level, the contents of two slices of the same type.
CreateTestAddr creates an unused address for testing.
Error is a passthrough to fmt.Error, with an additional prefix containing the filename and line number.
Errorf is a passthrough to fmt.Errorf, with an additional prefix containing the filename and line number.
ErrorfSkipFrames allows the skip count for stack frames to be specified.
ErrorSkipFrames allows the skip count for stack frames to be specified.
IsTrueWithin returns an error if the supplied function fails to evaluate to true within the specified duration.
MapKeys takes a map[KeyType]ValueType and returns a slice []KeyType containing the keys of the input map as an interface{} which may be manipulated freely.
NewLRUCache creates a new LRUCache.
NewPseudoRand returns an instance of math/rand.Rand seeded from crypto/rand so we can easily and cheaply generate unique streams of numbers.
RandIntInRange returns a value in [min, max).
RetryWithBackoff implements retry with exponential backoff using the supplied options as parameters.
# Variables
CachedRand is a global singleton rand.Rand object cached for one-off purposes to generate random numbers.
# Structs
LRUCache is an LRU cache.
RetryOptions provides control of retry loop logic via the RetryWithBackoffOptions method.