mv non-core components to extended repo

This commit is contained in:
ginuerzh
2022-03-14 17:43:37 +08:00
parent bfc1f8472c
commit 5c5af49b0e
279 changed files with 608 additions and 14301 deletions

23
pkg/metrics/nop.go Normal file
View File

@ -0,0 +1,23 @@
package metrics
var (
nilGauge = &nopGauge{}
nilCounter = &nopCounter{}
nilObserver = &nopObserver{}
)
type nopGauge struct{}
func (*nopGauge) Inc() {}
func (*nopGauge) Dec() {}
func (*nopGauge) Add(v float64) {}
func (*nopGauge) Set(v float64) {}
type nopCounter struct{}
func (*nopCounter) Inc() {}
func (*nopCounter) Add(v float64) {}
type nopObserver struct{}
func (*nopObserver) Observe(v float64) {}