[#373] local storage: Pass parent ID

This is required to add shard ID as metric label.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-06-07 14:39:03 +03:00
parent d5aaec1107
commit d8ecc69d00
16 changed files with 47 additions and 0 deletions

View file

@ -72,6 +72,13 @@ func (b *BlobStor) SetLogger(l *logger.Logger) {
b.log = l
}
func (b *BlobStor) SetParentID(parentID string) {
b.metrics.SetParentID(parentID)
for _, ss := range b.storage {
ss.Storage.SetParentID(parentID)
}
}
// WithStorages provides sub-blobstors.
func WithStorages(st []SubStorage) Option {
return func(c *cfg) {