[#324] Add replicator metrics
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-05-12 11:44:21 +03:00 committed by Evgenii Stratonikov
parent 6055b18362
commit a6ee7a3087
6 changed files with 86 additions and 0 deletions

View file

@ -26,6 +26,8 @@ type cfg struct {
remoteSender *putsvc.RemoteSender
localStorage *engine.StorageEngine
metrics MetricsRegister
}
func defaultCfg() *cfg {
@ -74,3 +76,9 @@ func WithLocalStorage(v *engine.StorageEngine) Option {
c.localStorage = v
}
}
func WithMetrics(v MetricsRegister) Option {
return func(c *cfg) {
c.metrics = v
}
}