metrics

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsInfo

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

MetricsInfo Metrics contains Prometheus metrics

func NewMetricsInfo

func NewMetricsInfo() *MetricsInfo

func (*MetricsInfo) RecordCeps

func (m *MetricsInfo) RecordCeps(ns string)

RecordCheck updates the total number of checked.

func (*MetricsInfo) RecordCheck

func (m *MetricsInfo) RecordCheck(epname, ns, instance, probe string)

RecordCheck updates the total number of checked.

func (*MetricsInfo) RecordCheckDuration

func (m *MetricsInfo) RecordCheckDuration(epname, ns, instance, probe string, seconds float64)

RecordCheckDuration records the number of seconds taken by a checked.

func (*MetricsInfo) RecordFailedCheck

func (m *MetricsInfo) RecordFailedCheck(epname, ns, instance, probe string)

RecordFailedCheck updates the total number of successful checked.

func (*MetricsInfo) RecordSuccessfulCheck

func (m *MetricsInfo) RecordSuccessfulCheck(epname, ns, instance, probe string)

RecordSuccessfulCheck updates the total number of successful checked.

func (*MetricsInfo) RegisterAllMetrics

func (m *MetricsInfo) RegisterAllMetrics()

type Point

type Point struct {
	Name              string
	Namespace         string
	TargetHostAndPort string
	ProbeType         ProbeType
}

type ProbeType

type ProbeType string
const (
	GRPC ProbeType = "grpc"
	HTTP ProbeType = "http"
	TCP  ProbeType = "tcp"
	EXEC ProbeType = "exec"
	UDP  ProbeType = "udp"
)

Jump to

Keyboard shortcuts

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