plugin

package
v3.1.0-rc.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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) Decrease

func (c *CounterMetric) Decrease(dec float64) float64

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)

func (*CounterMetric) Increase

func (c *CounterMetric) Increase(inc float64) float64

func (*CounterMetric) Reset

func (c *CounterMetric) Reset()

func (*CounterMetric) Set

func (c *CounterMetric) Set(val float64)

type IntegerCounter

type IntegerCounter struct {
	// contains filtered or unexported fields
}

IntegerCounter counter for integer

func NewIntegerCounter

func NewIntegerCounter(name, help string) *IntegerCounter

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL