Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountTracker ¶
type Counters ¶
type Counters struct {
// contains filtered or unexported fields
}
func NewCounters ¶
type Histogram ¶
type Histogram struct {
// contains filtered or unexported fields
}
func NewGenericHistogram ¶
func NewHistogram ¶
func (*Histogram) MarshalJSON ¶
type RingInt64 ¶
type RingInt64 struct {
// contains filtered or unexported fields
}
Ring of int64 values Not thread safe
func NewRingInt64 ¶
type States ¶
type States struct { // set at construction time StateCount int Labels []string CurrentState int CurrentStateStartTime time.Time // when we switched to our state // historical data about the states Durations []time.Duration // how much time in each state Transitions []int // how many times we got into a state // contains filtered or unexported fields }
The States structure keeps historical data about a state machine state, and exports them using expvar: - our current state - how long we have been in each state - how many times we transitioned into a state (not counting initial state)
func (*States) SetStateAt ¶
now has to be increasing, or we panic. Usually, only one execution thread can change a state, and therefore just using time.now() will be enough
type StrFunc ¶
type StrFunc func() string
StrFunc converts any function that returns a JSON string into an expvar.Var compatible object.
Click to show internal directories.
Click to hide internal directories.