Documentation
¶
Index ¶
- Constants
- func GenID(s string) string
- func NewStatsdPacketFromPacket(p *Packet) *qtypes.StatsdPacket
- type BucketID
- type Float64Slice
- type MsgParser
- type Packet
- type Percentile
- type Percentiles
- type StatsQ
- func (sd *StatsQ) Bool(path string) bool
- func (sd *StatsQ) BoolOr(path string, alt bool) bool
- func (sd *StatsQ) FanOutCounters(now time.Time) int64
- func (sd *StatsQ) FanOutGauges(now time.Time) int64
- func (sd *StatsQ) FanOutMetrics()
- func (sd *StatsQ) FanOutSets(now time.Time) int64
- func (sd *StatsQ) FanOutTimers(now time.Time) int64
- func (sd *StatsQ) HandlerStatsdPacket(sp *qtypes.StatsdPacket)
- func (sd *StatsQ) Int(path string) int
- func (sd *StatsQ) IntOr(path string, alt int) int
- func (sd *StatsQ) Log(logLevel, msg string)
- func (sd *StatsQ) LoopChannel()
- func (sd *StatsQ) ParseLine(msg string) (err error)
- func (sd *StatsQ) ParseTo(conn io.ReadCloser, partialReads bool)
- func (sd *StatsQ) ProcessCounters(buffer *bytes.Buffer, now int64) int64
- func (sd *StatsQ) ProcessGauges(buffer *bytes.Buffer, now int64) int64
- func (sd *StatsQ) ProcessSets(buffer *bytes.Buffer, now int64) int64
- func (sd *StatsQ) ProcessTimers(buffer *bytes.Buffer, now int64) int64
- func (sd *StatsQ) RelayMetrics()
- func (sd *StatsQ) Run()
- func (sd *StatsQ) String(path string) string
- func (sd *StatsQ) StringOr(path, alt string) string
- type TimerResult
Constants ¶
View Source
const ( MAX_UNPROCESSED_PACKETS = 1000 TCP_READ_SIZE = 4096 )
Variables ¶
This section is empty.
Functions ¶
func NewStatsdPacketFromPacket ¶
func NewStatsdPacketFromPacket(p *Packet) *qtypes.StatsdPacket
Types ¶
type Float64Slice ¶
type Float64Slice []float64
func (Float64Slice) Len ¶
func (s Float64Slice) Len() int
func (Float64Slice) Less ¶
func (s Float64Slice) Less(i, j int) bool
func (Float64Slice) Swap ¶
func (s Float64Slice) Swap(i, j int)
type MsgParser ¶
type MsgParser struct {
// contains filtered or unexported fields
}
type Percentile ¶
type Percentile struct {
// contains filtered or unexported fields
}
func (*Percentile) String ¶
func (p *Percentile) String() string
type Percentiles ¶
type Percentiles []*Percentile
func (*Percentiles) Set ¶
func (a *Percentiles) Set(s string) error
func (*Percentiles) String ¶
func (a *Percentiles) String() string
type StatsQ ¶
type StatsQ struct {
Name string
Version string
Parser MsgParser
Signalchan chan os.Signal
Cfg *config.Config
In chan *qtypes.StatsdPacket
Counters map[string]float64
Gauges map[string]float64
Timers map[string]Float64Slice
CountInactivity map[string]int64
Sets map[string][]string
ReceiveCounter string
QChan qtypes.QChan
Percentiles Percentiles
BucketMapping map[string]BucketID
}
func NewNamedStatsQ ¶
func (*StatsQ) FanOutMetrics ¶
func (sd *StatsQ) FanOutMetrics()
func (*StatsQ) HandlerStatsdPacket ¶
func (sd *StatsQ) HandlerStatsdPacket(sp *qtypes.StatsdPacket)
func (*StatsQ) LoopChannel ¶
func (sd *StatsQ) LoopChannel()
func (*StatsQ) ProcessCounters ¶
func (*StatsQ) ProcessGauges ¶
func (*StatsQ) ProcessTimers ¶
func (*StatsQ) RelayMetrics ¶
func (sd *StatsQ) RelayMetrics()
RelayMetrics listens for metrics on the QChan.Data channel and sends the metrics to the backends
type TimerResult ¶
func NewTimerResult ¶
func NewTimerResult(exp map[string]float64) TimerResult
func (*TimerResult) Check ¶
func (tr *TimerResult) Check() bool
func (*TimerResult) Input ¶
func (tr *TimerResult) Input(name string, value float64)
func (*TimerResult) Result ¶
func (tr *TimerResult) Result() string
Click to show internal directories.
Click to hide internal directories.