[#1121] node: Change mode of shard components
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
This commit is contained in:
parent
6f2187a420
commit
806236da78
47 changed files with 194 additions and 100 deletions
|
@ -4,12 +4,13 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/metrics"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
type BlobobvnizcaMetrics interface {
|
||||
SetBlobobvnizcaTreeMode(shardID, path string, readOnly bool)
|
||||
SetBlobobvnizcaTreeMode(shardID, path string, mode mode.ComponentMode)
|
||||
CloseBlobobvnizcaTree(shardID, path string)
|
||||
BlobobvnizcaTreeMethodDuration(shardID, path string, method string, d time.Duration, success bool, withStorageID NullBool)
|
||||
AddBlobobvnizcaTreePut(shardID, path string, size int)
|
||||
|
@ -98,8 +99,8 @@ func newBlobovnicza() *blobovnicza {
|
|||
}
|
||||
}
|
||||
|
||||
func (b *blobovnicza) SetBlobobvnizcaTreeMode(shardID, path string, readOnly bool) {
|
||||
b.treeMode.SetMode(shardID, path, modeFromBool(readOnly))
|
||||
func (b *blobovnicza) SetBlobobvnizcaTreeMode(shardID, path string, mod mode.ComponentMode) {
|
||||
b.treeMode.SetMode(shardID, path, mod.String())
|
||||
}
|
||||
|
||||
func (b *blobovnicza) CloseBlobobvnizcaTree(shardID, path string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue