Documentation
¶
Index ¶
- Constants
- type Metric
- func (m *Metric) Add(value float64, tags map[string]string) error
- func (m *Metric) Collector() prometheus.Collector
- func (m *Metric) Dec(tags map[string]string) error
- func (m *Metric) Inc(tags map[string]string) error
- func (m *Metric) Name() string
- func (m *Metric) Observe(value float64, tags map[string]string) error
- func (m *Metric) Set(value float64, tags map[string]string) error
- func (m *Metric) Sub(value float64, tags map[string]string) error
- type MetricClass
- type MetricInterface
- type MonitorInterface
Constants ¶
View Source
const ( GAUGE = iota COUNTER HISTOGRAM )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metric ¶ added in v1.2.0
type Metric struct {
// contains filtered or unexported fields
}
func NewMetric ¶ added in v1.2.0
func NewMetric(class MetricClass, name string, labels ...string) *Metric
NewMetric creates a new Metric object, class needs to be one of type MetricClass, like the following * GAUGE = 0 * COUNTER = 1 * HISTOGRAM = 2
func (*Metric) Collector ¶ added in v1.2.0
func (m *Metric) Collector() prometheus.Collector
type MetricClass ¶ added in v1.2.0
type MetricClass int
type MetricInterface ¶ added in v1.2.0
type MonitorInterface ¶
type MonitorInterface interface { GetMetric(string) (MetricInterface, error) AddMetrics(...MetricInterface) error GetService() string GetLogger() logging.LoggerInterface }
Click to show internal directories.
Click to hide internal directories.