prometheus

package
v2.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package prometheus defines a Prometheus metric implementation for DoH.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialMetrics

type DialMetrics interface {
	DoTDialInc(provider, address, outcome string)
	DNSDialInc(address, outcome string)
}

type Metrics

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

func New

func New(settings Settings) (metrics *Metrics, err error)

func (Metrics) DoHDialInc

func (c Metrics) DoHDialInc(url string)

type Settings

type Settings struct {
	// Prometheus defines common Prometheus settings.
	Prometheus prom.Settings
	// DoTDialMetrics is the metrics interface for the
	// DoT dialer. It defaults to a No-op implementation.
	DoTDialMetrics DialMetrics
}

func (*Settings) SetDefaults

func (s *Settings) SetDefaults()

func (Settings) Validate

func (s Settings) Validate() (err error)

Jump to

Keyboard shortcuts

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