-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathmetrics.go
More file actions
32 lines (23 loc) · 1.1 KB
/
metrics.go
File metadata and controls
32 lines (23 loc) · 1.1 KB
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
32
/*
Copyright © 2024 Acronis International GmbH.
Released under MIT license.
*/
package throttle
import (
"github.com/acronis/go-appkit/internal/throttleconfig"
)
// MetricsCollector represents a collector of metrics for rate/in-flight limiting rejects.
type MetricsCollector = throttleconfig.MetricsCollector
// PrometheusMetricsOpts represents options for PrometheusMetrics.
type PrometheusMetricsOpts = throttleconfig.PrometheusMetricsOpts
// PrometheusMetrics represents a collector of Prometheus metrics for rate/in-flight limiting rejects.
type PrometheusMetrics = throttleconfig.PrometheusMetrics
// NewPrometheusMetrics creates a new instance of PrometheusMetrics.
func NewPrometheusMetrics() *throttleconfig.PrometheusMetrics {
return throttleconfig.NewPrometheusMetrics("")
}
// NewPrometheusMetricsWithOpts creates a new instance of PrometheusMetrics with the provided options.
func NewPrometheusMetricsWithOpts(opts throttleconfig.PrometheusMetricsOpts) *throttleconfig.PrometheusMetrics {
return throttleconfig.NewPrometheusMetricsWithOpts("", opts)
}
type disabledMetrics = throttleconfig.DisabledMetrics