forked from TrueCloudLab/frostfs-node
[#426] Put prometheus behind pkg/metrics
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
3c0e47e6fd
commit
b8e10571c6
19 changed files with 561 additions and 311 deletions
|
@ -23,7 +23,7 @@ type Option func(*cfg)
|
|||
type cfg struct {
|
||||
log *logger.Logger
|
||||
|
||||
enableMetrics bool
|
||||
metrics MetricRegister
|
||||
}
|
||||
|
||||
func defaultCfg() *cfg {
|
||||
|
@ -54,8 +54,8 @@ func WithLogger(l *logger.Logger) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func WithMetrics(v bool) Option {
|
||||
func WithMetrics(v MetricRegister) Option {
|
||||
return func(c *cfg) {
|
||||
c.enableMetrics = v
|
||||
c.metrics = v
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue