Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LogDiscard disables logging of DNS requests. LogDiscard = iota // LogAll logs all DNS requests. LogAll // LogHijacked only logs hijacked DNS requests. LogHijacked )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a persistent DNS cache. Values added to the cache are written to a SQL database.
func (*Cache) Reset ¶
func (c *Cache) Reset()
Reset queues removal of all entries. As Set, Reset is non-blocking.
type CacheStats ¶
type CacheStats struct {
PendingTasks int
}
CacheStats containts cache statistics.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements a client for a SQLite database.
type LogEntry ¶
type LogEntry struct { Time time.Time RemoteAddr net.IP Hijacked bool Qtype uint16 Question string Answers []string }
LogEntry represents a log entry for a DNS request.
type LogStats ¶
type LogStats struct { Since time.Time Total int64 Hijacked int64 PendingTasks int Events []LogEvent }
LogStats contains log statistics.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a logger that logs DNS requests to a SQL database.
Click to show internal directories.
Click to hide internal directories.