ipld-eth-server/vendor/github.com/ipfs/go-metrics-interface/noop.go
Elizabeth Engelman 36533f7c3f Update vendor directory and make necessary code changes
Fixes for new geth version
2019-09-25 16:32:27 -05:00

47 lines
574 B
Go

package metrics
// Also implements the Counter interface
type noop struct{}
func (g *noop) Set(v float64) {
// Noop
}
func (g *noop) Inc() {
// Noop
}
func (g *noop) Dec() {
// Noop
}
func (g *noop) Add(v float64) {
// Noop
}
func (g *noop) Sub(v float64) {
// Noop
}
func (g *noop) Observe(v float64) {
// Noop
}
// Creator functions
func (g *noop) Counter() Counter {
return g
}
func (g *noop) Gauge() Gauge {
return g
}
func (g *noop) Histogram(buckets []float64) Histogram {
return g
}
func (g *noop) Summary(opts SummaryOpts) Summary {
return g
}