Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MurmurHash3Sum ¶
func NewMurmurHash3 ¶
func NewRand ¶
NewRand returns a properly seeded *rand.Rand.
The returned value is not thread-safe. If you need a thread-safe random number generator, use the top-level functions of the "math/rand/v2" package. They are not as fast as the Go 1 ("math/rand") generator, but they are much faster if access to the Go 1 generator must be guarded by a mutex.
Types ¶
type Clock ¶
type Clock interface {
After(d time.Duration) <-chan time.Time
Sleep(d time.Duration)
Now() time.Time
Since(t time.Time) time.Duration
NewTicker(d time.Duration) Ticker
NewTimer(d time.Duration) Timer
AfterFunc(d time.Duration, f func()) Timer
}
Clock is an interface that is compatible with the jonboulle/clockwork package. The intent is that clockwork package only be a dependency for tests, not for non-test code.
func NewRealClock ¶
func NewRealClock() Clock
NewRealClock returns a Clock implementation where all methods delegate to the corresponding function in the time package.
type MurmurHash3 ¶
type MurmurHash3 struct {
// contains filtered or unexported fields
}
func (*MurmurHash3) BlockSize ¶
func (h *MurmurHash3) BlockSize() int
func (*MurmurHash3) Reset ¶
func (h *MurmurHash3) Reset()
func (*MurmurHash3) Size ¶
func (h *MurmurHash3) Size() int
func (*MurmurHash3) Sum ¶
func (h *MurmurHash3) Sum(b []byte) []byte
func (*MurmurHash3) Sum32 ¶
func (h *MurmurHash3) Sum32() uint32
type Ticker ¶
Ticker is an interface covering the behavior of a time.Ticker.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package balancertesting provides some helper functions and types that can be useful when testing custom load balancer implementations.
|
Package balancertesting provides some helper functions and types that can be useful when testing custom load balancer implementations. |
|
Package clocktest exists to allow interoperability with our Clock interface and the Clockwork FakeClock.
|
Package clocktest exists to allow interoperability with our Clock interface and the Clockwork FakeClock. |
|
Package conns contains internal helpers relating to conn.Conns values.
|
Package conns contains internal helpers relating to conn.Conns values. |