소스 검색

add reporter function

mihasya 12 년 전
부모
커밋
ca04ba3021
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      librato/librato.go

+ 6 - 1
librato/librato.go

@@ -14,7 +14,12 @@ type LibratoReporter struct {
 	Source       string
 	Interval     time.Duration
 	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() {