2023-06-05 07:25:25 +00:00
|
|
|
package blobovniczatree
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobovnicza"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Metrics interface {
|
2023-08-18 08:14:10 +00:00
|
|
|
Blobovnicza() blobovnicza.Metrics
|
2023-06-05 07:25:25 +00:00
|
|
|
|
2023-06-07 11:39:03 +00:00
|
|
|
SetParentID(parentID string)
|
|
|
|
|
2023-06-05 07:25:25 +00:00
|
|
|
SetMode(readOnly bool)
|
|
|
|
Close()
|
|
|
|
|
|
|
|
Delete(d time.Duration, success, withStorageID bool)
|
|
|
|
Exists(d time.Duration, success, withStorageID bool)
|
|
|
|
GetRange(d time.Duration, size int, success, withStorageID bool)
|
|
|
|
Get(d time.Duration, size int, success, withStorageID bool)
|
|
|
|
Iterate(d time.Duration, success bool)
|
|
|
|
Put(d time.Duration, size int, success bool)
|
|
|
|
}
|
|
|
|
|
|
|
|
type noopMetrics struct{}
|
|
|
|
|
2023-06-07 11:39:03 +00:00
|
|
|
func (m *noopMetrics) SetParentID(string) {}
|
2023-06-05 07:25:25 +00:00
|
|
|
func (m *noopMetrics) SetMode(bool) {}
|
|
|
|
func (m *noopMetrics) Close() {}
|
|
|
|
func (m *noopMetrics) Delete(time.Duration, bool, bool) {}
|
|
|
|
func (m *noopMetrics) Exists(time.Duration, bool, bool) {}
|
|
|
|
func (m *noopMetrics) GetRange(time.Duration, int, bool, bool) {}
|
|
|
|
func (m *noopMetrics) Get(time.Duration, int, bool, bool) {}
|
|
|
|
func (m *noopMetrics) Iterate(time.Duration, bool) {}
|
|
|
|
func (m *noopMetrics) Put(time.Duration, int, bool) {}
|
2023-08-18 08:14:10 +00:00
|
|
|
func (m *noopMetrics) Blobovnicza() blobovnicza.Metrics {
|
2023-06-09 09:14:32 +00:00
|
|
|
return &blobovnicza.NoopMetrics{}
|
|
|
|
}
|