Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
Buckets = []float64{
10,
100,
250,
500,
1000,
1500,
2000,
3000,
5000,
10000,
}
)
Useful latency buckets
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock acts as a thin wrapper around global time that allows for easy testing
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor ...
type Meter ¶
type Meter interface { // Notify this meter of a new event for it to rate Tick() // Return the number of events this meter is currently tracking Ticks() int }
Meter tracks the number of occurrences of a specified event
type Repeater ¶
type Repeater struct {
// contains filtered or unexported fields
}
Repeater ...
func NewRepeater ¶
NewRepeater ...
type TimedMeter ¶
type TimedMeter struct { // Amount of time to keep a tick Duration time.Duration // contains filtered or unexported fields }
TimedMeter is a meter that discards old events
type TimeoutManager ¶
type TimeoutManager struct {
// contains filtered or unexported fields
}
TimeoutManager is a manager for timeouts.
func (*TimeoutManager) Initialize ¶
func (tm *TimeoutManager) Initialize(duration time.Duration)
Initialize is a constructor b/c Golang, in its wisdom, doesn't ... have them?
func (*TimeoutManager) Put ¶
func (tm *TimeoutManager) Put(id ids.ID, handler func())
Put puts hash into the hash map
func (*TimeoutManager) Remove ¶
func (tm *TimeoutManager) Remove(id ids.ID)
Remove the item that no longer needs to be there.
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
Timer wraps a timer object. This allows a user to specify a handler. Once specifying the handler, the dispatch thread can be called. The dispatcher will only return after calling Stop. SetTimeoutIn will result in calling the handler in the specified amount of time.
func (*Timer) SetTimeoutIn ¶
SetTimeoutIn will set the timer to fire the handler in [duration]