From 328691c94fc6fde64e66b926ddc6bf040246330e Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 5 Oct 2022 15:11:12 +0300 Subject: [PATCH] [#1840] blobstor: Return `Path` from components Signed-off-by: Evgenii Stratonikov --- .../blobstor/blobovniczatree/blobovnicza.go | 5 +++++ pkg/local_object_storage/blobstor/common/storage.go | 1 + pkg/local_object_storage/blobstor/fstree/fstree.go | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/pkg/local_object_storage/blobstor/blobovniczatree/blobovnicza.go b/pkg/local_object_storage/blobstor/blobovniczatree/blobovnicza.go index 0e7806d16b..e70ed06ae3 100644 --- a/pkg/local_object_storage/blobstor/blobovniczatree/blobovnicza.go +++ b/pkg/local_object_storage/blobstor/blobovniczatree/blobovnicza.go @@ -237,6 +237,11 @@ func (b *Blobovniczas) Type() string { return Type } +// Path implements common.Storage. +func (b *Blobovniczas) Path() string { + return b.rootPath +} + // SetCompressor implements common.Storage. func (b *Blobovniczas) SetCompressor(cc *compression.Config) { b.compression = cc diff --git a/pkg/local_object_storage/blobstor/common/storage.go b/pkg/local_object_storage/blobstor/common/storage.go index d6bea47a2d..85f8039a39 100644 --- a/pkg/local_object_storage/blobstor/common/storage.go +++ b/pkg/local_object_storage/blobstor/common/storage.go @@ -10,6 +10,7 @@ type Storage interface { Close() error Type() string + Path() string SetCompressor(cc *compression.Config) Get(GetPrm) (GetRes, error) diff --git a/pkg/local_object_storage/blobstor/fstree/fstree.go b/pkg/local_object_storage/blobstor/fstree/fstree.go index a2ab55c459..601d772aec 100644 --- a/pkg/local_object_storage/blobstor/fstree/fstree.go +++ b/pkg/local_object_storage/blobstor/fstree/fstree.go @@ -347,6 +347,11 @@ func (*FSTree) Type() string { return Type } +// Path implements common.Storage. +func (t *FSTree) Path() string { + return t.RootPath +} + // SetCompressor implements common.Storage. func (t *FSTree) SetCompressor(cc *compression.Config) { t.Config = cc