Dmitrii Stepanov
1b17258c04
All checks were successful
DCO action / DCO (pull_request) Successful in 1m22s
Vulncheck / Vulncheck (pull_request) Successful in 3m11s
Build / Build Components (1.21) (pull_request) Successful in 3m56s
Build / Build Components (1.20) (pull_request) Successful in 3m59s
Tests and linters / Staticcheck (pull_request) Successful in 5m31s
Tests and linters / gopls check (pull_request) Successful in 5m26s
Tests and linters / Lint (pull_request) Successful in 6m13s
Tests and linters / Tests (1.20) (pull_request) Successful in 8m54s
Tests and linters / Tests (1.21) (pull_request) Successful in 9m13s
Tests and linters / Tests with -race (pull_request) Successful in 9m30s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
30 lines
1.2 KiB
Go
30 lines
1.2 KiB
Go
package blobstor
|
|
|
|
import "time"
|
|
|
|
type Metrics interface {
|
|
SetParentID(parentID string)
|
|
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)
|
|
ObjectsCount(d time.Duration, success bool)
|
|
}
|
|
|
|
type noopMetrics struct{}
|
|
|
|
func (m *noopMetrics) SetParentID(string) {}
|
|
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) {}
|
|
func (m *noopMetrics) ObjectsCount(time.Duration, bool) {}
|