[#370] Add tree service metrics

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-05-24 10:01:50 +03:00 committed by Evgenii Stratonikov
parent f2e5dead7e
commit bc34fee6a7
9 changed files with 117 additions and 3 deletions

View file

@ -33,6 +33,8 @@ type cfg struct {
replicatorWorkerCount int
replicatorTimeout time.Duration
containerCacheSize int
metrics MetricsRegister
}
// Option represents configuration option for a tree service.
@ -116,3 +118,9 @@ func WithReplicationTimeout(t time.Duration) Option {
}
}
}
func WithMetrics(v MetricsRegister) Option {
return func(c *cfg) {
c.metrics = v
}
}