master
go 21 lines 368 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 package oldmetrix
4
5 import (
6 "github.com/netdata/netdata/go/plugins/pkg/stm"
7 )
8
9 // Observer is an interface that wraps the Observe method, which is used by
10 // Histogram and Summary to add observations.
11 type Observer interface {
12 stm.Value
13 Observe(v float64)
14 }
15
16 func Bool(b bool) int64 {
17 if b {
18 return 1
19 }
20 return 0
21 }