stats

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanDuration

func CleanDuration(d time.Duration) time.Duration

func CleanName

func CleanName(name string) string

func ReportBlocked

func ReportBlocked(req *dns.Msg, be *shared.BlockEntry)

func ReportCached

func ReportCached(req *dns.Msg, res *dns.Msg)

func ReportError

func ReportError(req *dns.Msg, res *dns.Msg, rtt time.Duration, err error)

func ReportSuccess

func ReportSuccess(req *dns.Msg, res *dns.Msg, rtt time.Duration, server string)

func RequestPct added in v0.4.5

func RequestPct(requests uint64, total uint64) string

Types

type Stats

type Stats struct {
	Blocked   uint64
	Cached    uint64
	Errors    uint64
	Successes uint64
	Rtt       time.Duration
}

func GetStats

func GetStats() Stats

Jump to

Keyboard shortcuts

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