forked from TrueCloudLab/frostfs-node
43 lines
1,000 B
Go
43 lines
1,000 B
Go
|
package writecache
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
|
||
|
)
|
||
|
|
||
|
type storageType string
|
||
|
|
||
|
const (
|
||
|
storageTypeUndefined storageType = "null"
|
||
|
storageTypeDB storageType = "db"
|
||
|
storageTypeFSTree storageType = "fstree"
|
||
|
)
|
||
|
|
||
|
type Metrics interface {
|
||
|
Get(d time.Duration, success bool, st storageType)
|
||
|
Delete(d time.Duration, success bool, st storageType)
|
||
|
Put(d time.Duration, success bool, st storageType)
|
||
|
Flush(success bool, st storageType)
|
||
|
Evict(st storageType)
|
||
|
|
||
|
Estimate(db, fstree uint64)
|
||
|
SetMode(m mode.Mode)
|
||
|
}
|
||
|
|
||
|
type metricsStub struct{}
|
||
|
|
||
|
func (s *metricsStub) Get(time.Duration, bool, storageType) {}
|
||
|
|
||
|
func (s *metricsStub) Delete(time.Duration, bool, storageType) {}
|
||
|
|
||
|
func (s *metricsStub) Put(time.Duration, bool, storageType) {}
|
||
|
|
||
|
func (s *metricsStub) Estimate(uint64, uint64) {}
|
||
|
|
||
|
func (s *metricsStub) SetMode(mode.Mode) {}
|
||
|
|
||
|
func (s *metricsStub) Flush(bool, storageType) {}
|
||
|
|
||
|
func (s *metricsStub) Evict(storageType) {}
|