forked from TrueCloudLab/frostfs-node
23 lines
597 B
Go
23 lines
597 B
Go
package meta
|
|
|
|
import (
|
|
"time"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
|
)
|
|
|
|
type Metrics interface {
|
|
SetParentID(parentID 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) {}
|