interface.go 747 B

12345678910111213141516171819202122232425262728
  1. package statsd
  2. import (
  3. "time"
  4. "github.com/quipo/statsd/event"
  5. )
  6. // Statsd is an interface to a StatsD client (buffered/unbuffered)
  7. type Statsd interface {
  8. CreateSocket() error
  9. CreateTCPSocket() error
  10. Close() error
  11. Incr(stat string, count int64) error
  12. Decr(stat string, count int64) error
  13. Timing(stat string, delta int64) error
  14. PrecisionTiming(stat string, delta time.Duration) error
  15. Gauge(stat string, value int64) error
  16. GaugeDelta(stat string, value int64) error
  17. Absolute(stat string, value int64) error
  18. Total(stat string, value int64) error
  19. FGauge(stat string, value float64) error
  20. FGaugeDelta(stat string, value float64) error
  21. FAbsolute(stat string, value float64) error
  22. SendEvents(events map[string]event.Event) error
  23. }