metrics

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RevSrcNotification = "notification"
	RevSrcSCMP         = "scmp"
	RevSrcPathReply    = "path_reply"
)

Revocation sources

View Source
const (
	OkSuccess        = prom.Success
	ErrInternal      = prom.ErrInternal
	ErrNetwork       = prom.ErrNetwork
	ErrDB            = prom.ErrDB
	ErrTimeout       = prom.ErrTimeout
	ErrParse         = prom.ErrParse
	ErrNotClassified = prom.ErrNotClassified
)

Result values

View Source
const (
	// Namespace is the metrics namespace for sciond.
	Namespace = "sd"
)

Variables

View Source
var (
	// PathRequests contains metrics for path requests.
	PathRequests = newPathRequest()
	// Revocations contains metrics for revocations.
	Revocations = newRevocation()
	// ASInfos contains metrics for AS info requests.
	ASInfos = newASInfoRequest()
	// IFInfos contains metrics for IF info requests.
	IFInfos = newIFInfo()
	// SVCInfos contains metrics for SVC info requests.
	SVCInfos = newSVCInfo()
)

Metric accessors.

Functions

This section is empty.

Types

type PathRequest

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

PathRequest contains the metrics for path requests.

func (PathRequest) Start

func (r PathRequest) Start() func(PathRequestLabels)

Start registers the start time of a path request and returns a callback that should be called at the end of processing the request.

type PathRequestLabels

type PathRequestLabels struct {
	Result string
	Dst    addr.ISD
}

PathRequestLabels are the labels for path requests metrics.

func (PathRequestLabels) Labels

func (l PathRequestLabels) Labels() []string

Labels returns the labels.

func (PathRequestLabels) Values

func (l PathRequestLabels) Values() []string

Values returns the values for the labels.

func (PathRequestLabels) WithResult

func (l PathRequestLabels) WithResult(result string) PathRequestLabels

WithResult returns the labels with the result set.

type Request

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

Request is the generic metric for requests.

func (Request) Start

func (r Request) Start() func(string)

Start registers the start time of a request and returns a callback that should be called at the end of processing the request.

type Revocation

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

Revocation contains the metrics for revocation processing.

func (Revocation) Count

Count returns the counter for revocations, this should only be incremented if Start is not used.

func (Revocation) Start

func (r Revocation) Start() func(RevocationLabels)

Start registers the start time of a revocation notification and returns a callback that should be called at the end of processing the notification.

type RevocationLabels

type RevocationLabels struct {
	Result string
	Src    string
}

RevocationLabels are the labels for revocation metrics.

func (RevocationLabels) Labels

func (l RevocationLabels) Labels() []string

Labels returns the labels.

func (RevocationLabels) Values

func (l RevocationLabels) Values() []string

Values returns the values for the labels.

func (RevocationLabels) WithResult

func (l RevocationLabels) WithResult(result string) RevocationLabels

WithResult returns the labels with the result set.

Jump to

Keyboard shortcuts

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