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 (
// Drop is the output interface for packets with errors that are dropped.
Drop = "drop"
)
View Source
const Namespace = "br"
Variables ¶
View Source
var ( Input = newInput() Output = newOutput() Process = newProcess() Control = newControl() )
Metrics initialization.
Functions ¶
func IntfToLabel ¶
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) Values ¶
func (l IntfLabels) Values() []string
Values returns the label values in the order defined by Labels.
type ProcessLabels ¶
type ProcessLabels struct { // Result is the outcome of processing the packet. Result string // In is the input SCION interface. IntfIn string // Out is the output SCION interface. IntfOut string }
func (ProcessLabels) Labels ¶
func (l ProcessLabels) Labels() []string
Labels returns the list of labels.
func (ProcessLabels) Values ¶
func (l ProcessLabels) 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.
Click to show internal directories.
Click to hide internal directories.