dohservice

package
v0.0.0-...-11c950b Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LogEmerg is a Syslog-type priority for Emergency messages
	LogEmerg uint = iota

	// LogAlert is a Syslog-type priority for Alert messages
	LogAlert

	// LogCrit is a Syslog-type priority for Critical messages
	LogCrit

	// LogErr is a Syslog-type priority for Error messages
	LogErr

	// LogWarn is a Syslog-type priority for Warning messages
	LogWarn

	// LogNotice is a Syslog-type priority for Notice messages
	LogNotice

	// LogInform is a Syslog-type priority for Informational messages
	LogInform

	// LogDebug is a Syslog-type priority for Debug messages
	LogDebug
)
View Source
const TelemetryDNSRequestTypeA uint = 0b00000001

TelemetryDNSRequestTypeA is an arbitary type to track DNS A requests

View Source
const TelemetryDNSRequestTypeAAAA uint = 0b00011100

TelemetryDNSRequestTypeAAAA is an arbitary type to track DNS AAAA requests

View Source
const TelemetryDNSRequestTypeALL uint = 0b11111111

TelemetryDNSRequestTypeALL is an arbitary type to track DNS ALL requests

View Source
const TelemetryDNSRequestTypeCNAME uint = 0b00000101

TelemetryDNSRequestTypeCNAME is an arbitary type to track DNS CNAME requests

View Source
const TelemetryDNSRequestTypeHINFO uint = 0b00001101

TelemetryDNSRequestTypeHINFO is an arbitary type to track DNS HINFO requests

View Source
const TelemetryDNSRequestTypeMINFO uint = 0b00001110

TelemetryDNSRequestTypeMINFO is an arbitary type to track DNS MINFO requests

View Source
const TelemetryDNSRequestTypeMX uint = 0b00001111

TelemetryDNSRequestTypeMX is an arbitary type to track DNS MX requests

View Source
const TelemetryDNSRequestTypeNS uint = 0b00000010

TelemetryDNSRequestTypeNS is an arbitary type to track DNS NS requests

View Source
const TelemetryDNSRequestTypePTR uint = 0b00001100

TelemetryDNSRequestTypePTR is an arbitary type to track DNS PTR requests

View Source
const TelemetryDNSRequestTypeSOA uint = 0b00000110

TelemetryDNSRequestTypeSOA is an arbitary type to track DNS SOA requests

View Source
const TelemetryDNSRequestTypeSRV uint = 0b00100001

TelemetryDNSRequestTypeSRV is an arbitary type to track DNS SRV requests

View Source
const TelemetryDNSRequestTypeTXT uint = 0b00010000

TelemetryDNSRequestTypeTXT is an arbitary type to track DNS TXT requests

View Source
const TelemetryDNSRequestTypeWKS uint = 0b00001011

TelemetryDNSRequestTypeWKS is an arbitary type to track DNS WKS requests

View Source
const TelemetryHTTPRequestTypeGet uint = 0b0000001000000000

TelemetryHTTPRequestTypeGet is an arbitary type to track HTTP GET requests

View Source
const TelemetryHTTPRequestTypePost uint = 0b0000001000000001

TelemetryHTTPRequestTypePost is an arbitary type to track HTTP POST requests

View Source
const TelemetryKeepAlive uint = 0b1111111111111111

TelemetryKeepAlive is a generic type to track internal keep-alive

View Source
const TelemetryRedisCacheHit uint = 0b0000001000000010

TelemetryRedisCacheHit is an arbitary type to track Redis cache hits

View Source
const TelemetryRedisCacheMiss uint = 0b0000001000000100

TelemetryRedisCacheMiss is an arbitary type to track Redis cache misses

Variables

View Source
var ActiveDNSResolvers = []DNSResolver{}

ActiveDNSResolvers is our list of known active resolvers

View Source
var GlobalDNSResolvers = []DNSResolver{}

GlobalDNSResolvers is our list of globally known resolvers

LogLevels is a map of logrus <-> syslog log levels.

TelemetryValues serves as a lookup table to map given keywords to a binary type. The binary type will be reflected over the IPC channel, in order to not fummel around with string literals

TelemetryValues is a public map, so external functions can make use of this.

Functions

func DNSQueryGet

func DNSQueryGet(w http.ResponseWriter, r *http.Request)

DNSQueryGet is the HTTP GET request handler, which performs minimum upfront validation, before passing the request over to the shared backend routine

func DNSQueryPost

func DNSQueryPost(w http.ResponseWriter, r *http.Request)

DNSQueryPost is the HTTP POST request handler, which performs minimum upfront validation, before passing the request over to the shared backend routine

func NewRouter

func NewRouter(chanTelemetry chan uint) *mux.Router

NewRouter initializes an HTTP multiplexer for the webservice

func TelemetryCollector

func TelemetryCollector(chanTelemetry chan uint)

TelemetryCollector receives information from other go routines and forwards them to InfluxDB

Types

type DNSResolver

type DNSResolver struct {
	Hostname  string
	Scheme    string
	Port      string
	ReqType   string
	Reachable byte
}

DNSResolver dummy

Jump to

Keyboard shortcuts

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