stats

package
v0.0.0-...-e6503be Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusStats

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

func NewPrometheusStats

func NewPrometheusStats(
	gaugeVec *prometheus.GaugeVec,
	counterVec *prometheus.CounterVec,
	errorsCounter *prometheus.CounterVec,
	histogramVec *prometheus.HistogramVec,
) *PrometheusStats

func (*PrometheusStats) CountCall

func (p *PrometheusStats) CountCall(env, node, path, method string, status int)

func (*PrometheusStats) CountError

func (p *PrometheusStats) CountError(env, node, path string, status int)

counts various errors

func (*PrometheusStats) GetLabeledResponseTimePeersHistogramTimer

func (p *PrometheusStats) GetLabeledResponseTimePeersHistogramTimer(env, node, path, method string) *prometheus.Timer

type PrometheusStatsCollector

type PrometheusStatsCollector interface {
	CountCall(env, node, path, method string, status int)
	CountError(env, node, path string, status int)
	GetLabeledResponseTimePeersHistogramTimer(env, node, path, method string) *prometheus.Timer
}

Jump to

Keyboard shortcuts

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