Przeglądaj źródła

add reporter function

mihasya 12 lat temu
rodzic
commit
ca04ba3021
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      librato/librato.go

+ 6 - 1
librato/librato.go

@@ -14,7 +14,12 @@ type LibratoReporter struct {
 	Source       string
 	Source       string
 	Interval     time.Duration
 	Interval     time.Duration
 	Registry     metrics.Registry
 	Registry     metrics.Registry
-	Percentiles  []float64
+	Percentiles  []float64 // percentiles to report on histogram metrics
+}
+
+func Librato(r metrics.Registry, d time.Duration, e string, t string, s string, p []float64) {
+	reporter := &LibratoReporter{e, t, s, d, r, p}
+	reporter.Run()
 }
 }
 
 
 func (self *LibratoReporter) Run() {
 func (self *LibratoReporter) Run() {