20 lines
357 B
Go
20 lines
357 B
Go
package p2p
|
|
|
|
import (
|
|
"github.com/go-kit/kit/metrics"
|
|
"github.com/go-kit/kit/metrics/discard"
|
|
)
|
|
|
|
// Metrics contains metrics exposed by this package.
|
|
// see MetricsProvider for descriptions.
|
|
type Metrics struct {
|
|
Peers metrics.Gauge
|
|
}
|
|
|
|
// NopMetrics returns no-op Metrics.
|
|
func NopMetrics() *Metrics {
|
|
return &Metrics{
|
|
Peers: discard.NewGauge(),
|
|
}
|
|
}
|