Documentation
¶
Index ¶
- Constants
- type FlushHandler
- type Stats
- type Statsd
- func (statsd *Statsd) Counter(key string, value string)
- func (statsd *Statsd) Feed(str string) error
- func (statsd *Statsd) Gauage(key string, value string)
- func (statsd *Statsd) KeyValue(key string, value string)
- func (statsd *Statsd) Run()
- func (statsd *Statsd) Set(key string, value string)
- func (statsd *Statsd) Stop()
- func (statsd *Statsd) Timer(key string, value string)
Constants ¶
View Source
const ( //TypeKeyValue key value aggregator TypeKeyValue = "kv" //TypeGauage gauage aggregator TypeGauage = "g" //TypeTimer timer aggregator TypeTimer = "ms" //TypeCounter counter aggregator TypeCounter = "c" //TypeSet set aggregator TypeSet = "s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stats ¶
type Stats struct {
Timestamp int64 `json:"timestamp"`
Series [][]interface{} `json:"series"`
}
Stats is the aggregated stats
type Statsd ¶
type Statsd struct {
// contains filtered or unexported fields
}
Statsd represents the statsd daemon
func NewStatsd ¶
func NewStatsd(prefix string, flush time.Duration, onflush FlushHandler) *Statsd
NewStatsd creats a new statsd daemon
func (*Statsd) Feed ¶
Feed statsd with statsD message according to specs str is in format 'key:value|type[|@flag]'
Click to show internal directories.
Click to hide internal directories.