prometheus

package
v2.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package prometheus defines a Prometheus metric implementation for DoH.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNewCounters = errors.New("failed creating counters metrics")
)

Functions

This section is empty.

Types

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 dot.DialMetrics
	// MiddlewareMetrics is the metrics interface for the
	// DNS middleware. It defaults to a No-op implementation.
	MiddlewareMetrics middleware.Interface
}

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