Documentation
¶
Index ¶
- type CounterInterface
- type CounterMetric
- func (c *CounterMetric) Decrease(dec float64) float64
- func (c CounterMetric) GetCounter() float64
- func (cm CounterMetric) GetExtension() (*metric.MetricExtension, error)
- func (cm CounterMetric) GetMeta() metric.MetricMeta
- func (cm CounterMetric) GetValue() (*metric.FloatOrString, error)
- func (c *CounterMetric) Increase(inc float64) float64
- func (c *CounterMetric) Reset()
- func (c *CounterMetric) Set(val float64)
- type IntegerCounter
- func (c *IntegerCounter) Dec(i int64)
- func (c *IntegerCounter) GetExtension() (*metric.MetricExtension, error)
- func (c *IntegerCounter) GetMeta() metric.MetricMeta
- func (c *IntegerCounter) GetValue() (*metric.FloatOrString, error)
- func (c *IntegerCounter) Inc(i int64)
- func (c *IntegerCounter) Reset()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CounterInterface ¶
type CounterInterface interface {
metric.MetricInterf
// increase the counter with value inc, and returned the increased value.
Increase(inc float64) float64
// decrease the counter with value dec, and returned the decreased value.
Decrease(dec float64) float64
// get the current counter value.
GetCounter() float64
// set the counter with val number.
Set(val float64)
// reset the counter with 0.
Reset()
}
func NewCounterMetric ¶
func NewCounterMetric(name, help string) CounterInterface
type CounterMetric ¶
type CounterMetric struct {
// contains filtered or unexported fields
}
func (CounterMetric) GetCounter ¶
func (c CounterMetric) GetCounter() float64
func (CounterMetric) GetExtension ¶
func (cm CounterMetric) GetExtension() (*metric.MetricExtension, error)
func (CounterMetric) GetMeta ¶
func (cm CounterMetric) GetMeta() metric.MetricMeta
func (CounterMetric) GetValue ¶
func (cm CounterMetric) GetValue() (*metric.FloatOrString, error)
type IntegerCounter ¶
type IntegerCounter struct {
// contains filtered or unexported fields
}
IntegerCounter counter for integer
func (*IntegerCounter) Dec ¶
func (c *IntegerCounter) Dec(i int64)
func (*IntegerCounter) GetExtension ¶
func (c *IntegerCounter) GetExtension() (*metric.MetricExtension, error)
func (*IntegerCounter) GetMeta ¶
func (c *IntegerCounter) GetMeta() metric.MetricMeta
func (*IntegerCounter) GetValue ¶
func (c *IntegerCounter) GetValue() (*metric.FloatOrString, error)
func (*IntegerCounter) Inc ¶
func (c *IntegerCounter) Inc(i int64)
func (*IntegerCounter) Reset ¶
func (c *IntegerCounter) Reset()
Click to show internal directories.
Click to hide internal directories.