frostfs-node/pkg/local_object_storage/pilorama/metrics.go
Alexander Chuprov d61f78ec1f [#1121] node: Change mode of shard components
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-06-04 16:30:04 +03:00

23 lines
595 B
Go

package pilorama
import (
"time"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
)
type Metrics interface {
SetParentID(id string)
SetMode(m mode.ComponentMode)
Close()
AddMethodDuration(method string, d time.Duration, success bool)
}
type noopMetrics struct{}
func (m *noopMetrics) SetParentID(string) {}
func (m *noopMetrics) SetMode(mode.ComponentMode) {}
func (m *noopMetrics) Close() {}
func (m *noopMetrics) AddMethodDuration(string, time.Duration, bool) {}