Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CactusStatterWrapper ¶
type CactusStatterWrapper struct {
// contains filtered or unexported fields
}
CactusStatterWrapper is a wrapper for a statsd.Statter with a rate for all stats.
func WrapCactusStatter ¶
func WrapCactusStatter(statter statsd.Statter, rate float32) *CactusStatterWrapper
WrapCactusStatter returns a CactusStatterWrapper of the statter at a given rate.
func (*CactusStatterWrapper) GetStatter ¶
func (c *CactusStatterWrapper) GetStatter() statsd.Statter
GetStatter returns the statsd statter as is
func (*CactusStatterWrapper) IncrBy ¶
func (c *CactusStatterWrapper) IncrBy(stat string, value int)
IncrBy reports the stat increment to the wrapped statter at our rate.
type FailMode ¶
type FailMode int
FailMode is an enum of the types of failure modes we report.
type Reporter ¶
Reporter Records Results and returns stats on them.
func BuildSpadeReporter ¶
BuildSpadeReporter builds a SpadeReporter on the given Trackers and starts its goroutine.
type Result ¶
type Result struct { Duration time.Duration FinishedAt time.Time Failure FailMode UUID string Line string Category string }
Result tracks an input record with identifiers, timing information, and failures.
type SpadeReporter ¶
type SpadeReporter struct { Trackers []Tracker // contains filtered or unexported fields }
SpadeReporter is a Reporter that also sends stats to external Trackers. It is NOT thread safe.
func (*SpadeReporter) Record ¶
func (r *SpadeReporter) Record(result *Result)
Record sends the given result to all trackers and our stats report.
func (*SpadeReporter) Report ¶
func (r *SpadeReporter) Report() map[string]int
Report returns the current stats report.
type SpadeStatsdTracker ¶
type SpadeStatsdTracker struct {
Stats StatsLogger
}
SpadeStatsdTracker is a Tracker that reports to statsd.
func (*SpadeStatsdTracker) Track ¶
func (s *SpadeStatsdTracker) Track(result *Result)
Track sends the given result to statsd.