mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-25 07:40:19 +00:00
40ad4163cb
Bumps the github-dependencies group with 2 updates: [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) and [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang). Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.30.7 to 1.31.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/s3/v1.31.1/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-go-v2/compare/service/mgn/v1.30.7...service/s3/v1.31.1) Updates `github.com/prometheus/client_golang` from 1.20.3 to 1.20.4 - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/client_golang/compare/v1.20.3...v1.20.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-dependencies - dependency-name: github.com/prometheus/client_golang dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
68 lines
2.5 KiB
Go
68 lines
2.5 KiB
Go
package metrics
|
|
|
|
import "context"
|
|
|
|
// NopMeterProvider is a no-op metrics implementation.
|
|
type NopMeterProvider struct{}
|
|
|
|
var _ MeterProvider = (*NopMeterProvider)(nil)
|
|
|
|
// Meter returns a meter which creates no-op instruments.
|
|
func (NopMeterProvider) Meter(string, ...MeterOption) Meter {
|
|
return nopMeter{}
|
|
}
|
|
|
|
type nopMeter struct{}
|
|
|
|
var _ Meter = (*nopMeter)(nil)
|
|
|
|
func (nopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) {
|
|
return nopInstrument[int64]{}, nil
|
|
}
|
|
func (nopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) {
|
|
return nopInstrument[int64]{}, nil
|
|
}
|
|
func (nopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) {
|
|
return nopInstrument[int64]{}, nil
|
|
}
|
|
func (nopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) {
|
|
return nopInstrument[int64]{}, nil
|
|
}
|
|
func (nopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
|
return nopInstrument[int64]{}, nil
|
|
}
|
|
func (nopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
|
return nopInstrument[int64]{}, nil
|
|
}
|
|
func (nopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
|
return nopInstrument[int64]{}, nil
|
|
}
|
|
func (nopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) {
|
|
return nopInstrument[float64]{}, nil
|
|
}
|
|
func (nopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) {
|
|
return nopInstrument[float64]{}, nil
|
|
}
|
|
func (nopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) {
|
|
return nopInstrument[float64]{}, nil
|
|
}
|
|
func (nopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) {
|
|
return nopInstrument[float64]{}, nil
|
|
}
|
|
func (nopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
|
return nopInstrument[float64]{}, nil
|
|
}
|
|
func (nopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
|
return nopInstrument[float64]{}, nil
|
|
}
|
|
func (nopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
|
|
return nopInstrument[float64]{}, nil
|
|
}
|
|
|
|
type nopInstrument[N any] struct{}
|
|
|
|
func (nopInstrument[N]) Add(context.Context, N, ...RecordMetricOption) {}
|
|
func (nopInstrument[N]) Sample(context.Context, N, ...RecordMetricOption) {}
|
|
func (nopInstrument[N]) Record(context.Context, N, ...RecordMetricOption) {}
|
|
func (nopInstrument[_]) Stop() {}
|