Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions circonus/circonus.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
cgm "github.com/circonus-labs/circonus-gometrics"
)

// This ensures *CirconusSink implements the MetricSink interface.
var _ metrics.MetricSink = (*CirconusSink)(nil)

// CirconusSink provides an interface to forward metrics to Circonus with
// automatic check creation and metric management
type CirconusSink struct {
Expand Down
3 changes: 3 additions & 0 deletions datadog/dogstatsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import (
"github.com/armon/go-metrics"
)

// This ensures *DogStatsdSink implements the MetricSink interface.
var _ metrics.MetricSink = (*DogStatsdSink)(nil)

// DogStatsdSink provides a MetricSink that can be used
// with a dogstatsd server. It utilizes the Dogstatsd client at github.com/DataDog/datadog-go/statsd
type DogStatsdSink struct {
Expand Down
3 changes: 3 additions & 0 deletions inmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import (
"time"
)

// This ensures *InmemSink implements the MetricSink interface.
var _ MetricSink = (*InmemSink)(nil)

// InmemSink provides a MetricSink that does in-memory aggregation
// without sending metrics over a network. It can be embedded within
// an application to provide profiling information.
Expand Down
3 changes: 3 additions & 0 deletions prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ var (
}
)

// This ensures *PrometheusSink implements the MetricSink interface.
var _ metrics.MetricSink = (*PrometheusSink)(nil)

// PrometheusOpts is used to configure the Prometheus Sink
type PrometheusOpts struct {
// Expiration is the duration a metric is valid for, after which it will be
Expand Down
3 changes: 3 additions & 0 deletions statsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const (
statsdMaxLen = 1400
)

// This ensures *StatsdSink implements the MetricSink interface.
var _ MetricSink = (*StatsdSink)(nil)

// StatsdSink provides a MetricSink that can be used
// with a statsite or statsd metrics server. It uses
// only UDP packets, while StatsiteSink uses TCP.
Expand Down
3 changes: 3 additions & 0 deletions statsite.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const (
flushInterval = 100 * time.Millisecond
)

// This ensures *StatsiteSink implements the MetricSink interface.
var _ MetricSink = (*StatsiteSink)(nil)

// NewStatsiteSinkFromURL creates an StatsiteSink from a URL. It is used
// (and tested) from NewMetricSinkFromURL.
func NewStatsiteSinkFromURL(u *url.URL) (MetricSink, error) {
Expand Down