aboutsummaryrefslogtreecommitdiffstats
path: root/library/go/core/metrics/nop/int_gauge.go
blob: 226059a79da8d11d7ecb7e4286b615e8944e7b7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package nop

import "github.com/ydb-platform/ydb/library/go/core/metrics"

var _ metrics.IntGauge = (*IntGauge)(nil)

type IntGauge struct{}

func (IntGauge) Set(_ int64) {}

func (IntGauge) Add(_ int64) {}

var _ metrics.IntGaugeVec = (*IntGaugeVec)(nil)

type IntGaugeVec struct{}

func (t IntGaugeVec) With(_ map[string]string) metrics.IntGauge {
	return IntGauge{}
}

func (t IntGaugeVec) Reset() {}

var _ metrics.FuncIntGauge = (*FuncIntGauge)(nil)

type FuncIntGauge struct {
	function func() int64
}

func (g FuncIntGauge) Function() func() int64 {
	return g.function
}