[#424] metrics: Use labels for writecache methods and operations

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-06-13 15:05:45 +03:00
parent 71bbeddb64
commit 07f155ac77
3 changed files with 60 additions and 77 deletions

17
pkg/metrics/types.go Normal file
View file

@ -0,0 +1,17 @@
package metrics
import (
"strconv"
)
type NullBool struct {
Bool bool
Valid bool // Valid is true if Bool is not NULL
}
func (v NullBool) String() string {
if !v.Valid {
return ""
}
return strconv.FormatBool(v.Bool)
}