forked from TrueCloudLab/frostfs-node
Dmitrii Stepanov
d8ecc69d00
This is required to add shard ID as metric label. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
23 lines
586 B
Go
23 lines
586 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.Mode)
|
|
Close()
|
|
|
|
AddMethodDuration(method string, d time.Duration, success bool)
|
|
}
|
|
|
|
type noopMetrics struct{}
|
|
|
|
func (m *noopMetrics) SetParentID(string) {}
|
|
func (m *noopMetrics) SetMode(mode.Mode) {}
|
|
func (m *noopMetrics) Close() {}
|
|
func (m *noopMetrics) AddMethodDuration(string, time.Duration, bool) {}
|