[#948] metrics: Set actual value for shard_id after restart

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2024-02-13 09:09:47 +03:00
parent 6a5769d1da
commit 0bd030507e
8 changed files with 27 additions and 1 deletions

View file

@ -19,6 +19,7 @@ const (
)
type Metrics interface {
SetShardID(string)
Get(d time.Duration, success bool, st StorageType)
Delete(d time.Duration, success bool, st StorageType)
Put(d time.Duration, success bool, st StorageType)
@ -35,6 +36,8 @@ func DefaultMetrics() Metrics { return metricsStub{} }
type metricsStub struct{}
func (metricsStub) SetShardID(string) {}
func (metricsStub) Get(time.Duration, bool, StorageType) {}
func (metricsStub) Delete(time.Duration, bool, StorageType) {}