metrics

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package metrics defines and exports router metrics to be scraped by prometheus.

Index

Constants

View Source
const (
	IFStateInfo = "ifstate_info"
	IFStateReq  = "ifstate_request"
	Revocation  = "revocation"
)

Control type values

View Source
const (
	Success       = prom.Success
	ErrProcess    = prom.ErrProcess
	ErrParse      = prom.ErrParse
	ErrCrypto     = prom.ErrCrypto
	ErrValidate   = prom.ErrValidate
	ErrInvalidReq = prom.ErrInvalidReq
	// ErrRead is an error reading a packet from snet.
	ErrRead = "err_read"
	// ErrWrite is an error writing a packet to snet.
	ErrWrite = "err_write"
	// ErrRoute is an error routing the packet.
	ErrRoute = "err_route"
	// ErrParsePayload is an error parsing the packet payload.
	ErrParsePayload = "err_parse_payload"
	// ErrResolveSVC is an error resolving a SVC address.
	ErrResolveSVC = "err_resolve_svc"
)

Result values.

View Source
const Namespace = "br"

Variables

View Source
var (
	Control = newControl()
)

Metrics initialization.

Functions

func IntfToLabel

func IntfToLabel(ifid common.IFIDType) string

Types

type ControlLabels

type ControlLabels struct {
	// Result is the outcome of processing the packet.
	Result string
}

func (ControlLabels) Labels

func (l ControlLabels) Labels() []string

Labels returns the list of labels.

func (ControlLabels) Values

func (l ControlLabels) Values() []string

Values returns the label values in the order defined by Labels.

type IntfLabels

type IntfLabels struct {
	// Intf is the interface ID
	Intf string
	// NeighIA is the remote IA of a given interface.
	NeighIA string
}

func (IntfLabels) Labels

func (l IntfLabels) Labels() []string

Labels returns the list of labels.

func (IntfLabels) Values

func (l IntfLabels) Values() []string

Values returns the label values in the order defined by Labels.

type SentRevInfoLabels

type SentRevInfoLabels struct {
	// Result is the outcome of processing the packet.
	Result string
	// SVC is the destination svc address.
	SVC string
}

func (SentRevInfoLabels) Labels

func (l SentRevInfoLabels) Labels() []string

Labels returns the list of labels.

func (SentRevInfoLabels) Values

func (l SentRevInfoLabels) Values() []string

Values returns the label values in the order defined by Labels.

Jump to

Keyboard shortcuts

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