forked from TrueCloudLab/frostfs-node
[#424] metrics: Use labels for writecache methods and operations
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
71bbeddb64
commit
07f155ac77
3 changed files with 60 additions and 77 deletions
17
pkg/metrics/types.go
Normal file
17
pkg/metrics/types.go
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue