metric

package
v0.0.0-...-062a873 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterMetric

type CounterMetric struct {
	Value       float64 `json:"value"`
	TimestampMS int64   `json:"timestamp"`
}

type CounterMetricState

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

func New

func New() *CounterMetricState

func NewFromFile

func NewFromFile(filename string) (*CounterMetricState, error)

NewFromFile creates a new metric state and populates it with the content of the specified JSON file.

func (*CounterMetricState) AddMetric

func (s *CounterMetricState) AddMetric(family *dto.MetricFamily, metric *dto.Metric)

func (*CounterMetricState) GetMetric

func (s *CounterMetricState) GetMetric(family *dto.MetricFamily, metric *dto.Metric) (bool, float64, int64)

func (*CounterMetricState) Read

func (s *CounterMetricState) Read(reader io.Reader) error

func (*CounterMetricState) Write

func (s *CounterMetricState) Write(writer io.Writer) error

Jump to

Keyboard shortcuts

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