Documentation ¶
Index ¶
Constants ¶
const ( RevSrcNotification = "notification" RevSrcSCMP = "scmp" RevSrcPathReply = "path_reply" )
Revocation sources
const ( OkSuccess = prom.Success ErrInternal = prom.ErrInternal ErrNetwork = prom.ErrNetwork ErrDB = prom.ErrDB ErrTimeout = prom.ErrTimeout ErrParse = prom.ErrParse ErrNotClassified = prom.ErrNotClassified )
Result values
const (
// Namespace is the metrics namespace for sciond.
Namespace = "sd"
)
Variables ¶
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 ¶
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.
type Revocation ¶
type Revocation struct {
// contains filtered or unexported fields
}
Revocation contains the metrics for revocation processing.
func (Revocation) Count ¶
func (r Revocation) Count(l RevocationLabels) prometheus.Counter
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 ¶
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.