summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/armon/go-metrics/statsite.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/armon/go-metrics/statsite.go')
-rw-r--r--[-rwxr-xr-x]vendor/github.com/armon/go-metrics/statsite.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/armon/go-metrics/statsite.go b/vendor/github.com/armon/go-metrics/statsite.go
index 68730139a..572fe0571 100755..100644
--- a/vendor/github.com/armon/go-metrics/statsite.go
+++ b/vendor/github.com/armon/go-metrics/statsite.go
@@ -5,6 +5,7 @@ import (
"fmt"
"log"
"net"
+ "net/url"
"strings"
"time"
)
@@ -16,6 +17,12 @@ const (
flushInterval = 100 * time.Millisecond
)
+// NewStatsiteSinkFromURL creates an StatsiteSink from a URL. It is used
+// (and tested) from NewMetricSinkFromURL.
+func NewStatsiteSinkFromURL(u *url.URL) (MetricSink, error) {
+ return NewStatsiteSink(u.Host)
+}
+
// StatsiteSink provides a MetricSink that can be used with a
// statsite metrics server
type StatsiteSink struct {