github.com/songzhibin97/gkit@v1.2.13/metrics/metrics.go (about)

     1  package metrics
     2  
     3  // package metrics: 指标信息
     4  
     5  // Counter is metrics counter.
     6  type Counter interface {
     7  	With(lvs ...string) Counter
     8  	Inc()
     9  	Add(delta float64)
    10  }
    11  
    12  // Gauge is metrics gauge.
    13  type Gauge interface {
    14  	With(lvs ...string) Gauge
    15  	Set(value float64)
    16  	Add(delta float64)
    17  	Sub(delta float64)
    18  }
    19  
    20  // Observer is metrics observer.
    21  type Observer interface {
    22  	With(lvs ...string) Observer
    23  	Observe(float64)
    24  }