Documentation ¶
Index ¶
- func CacheMulticastMessages(cache *gocache.Cache, msgChan chan *dns.Msg)
- func MulticastMdnsListen(msgChan chan *dns.Msg)
- func MulticastMdnsQuery()
- func ParseMulticastMessage(msg *dns.Msg) map[string]string
- func ReadCachedHostname(cache *gocache.Cache, address string) string
- type LogInfo
- type QLog
- type QueryLogQuery
- type ReverseLookupFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheMulticastMessages ¶ added in v0.3.17
func MulticastMdnsListen ¶ added in v0.3.17
func MulticastMdnsQuery ¶ added in v0.3.17
func MulticastMdnsQuery()
func ParseMulticastMessage ¶ added in v0.3.17
Types ¶
type LogInfo ¶ added in v0.3.0
type LogInfo struct { // client address Address string // hold the information but aren't serialized Request *dns.Msg `json:"-"` Response *dns.Msg `json:"-"` Result *resolver.ResolutionResult `json:"-"` RequestContext *resolver.RequestContext `json:"-"` // generated/calculated values Consumer string ClientName string ConnectionType string RequestDomain string RequestType string ResponseText string Blocked bool BlockedList string BlockedRule string Cached bool Created time.Time }
info passed over channel and stored in database and that is recovered via the Query method
type QLog ¶ added in v0.3.0
type QLog interface { Query(query *QueryLogQuery) ([]LogInfo, uint64) Log(address *net.IP, request *dns.Msg, response *dns.Msg, rCon *resolver.RequestContext, result *resolver.ResolutionResult) Stop() }
public interface
func New ¶ added in v0.3.0
func New(conf *config.GudgeonConfig) (QLog, error)
create a new query log according to configuration
func NewWithReverseLookup ¶ added in v0.3.17
func NewWithReverseLookup(conf *config.GudgeonConfig, rlookup ReverseLookupFunction) (QLog, error)
type QueryLogQuery ¶ added in v0.3.0
type QueryLogQuery struct { // query on fields Address string ClientName string ConnectionType string RequestDomain string RequestType string ResponseText string Blocked *bool Cached *bool // query on created time After *time.Time Before *time.Time // query limits for paging Skip int Limit int // query sort SortBy string Direction string }
the type that is used to make queries against the query log (should be used by the web interface to find queries)
type ReverseLookupFunction ¶ added in v0.3.17
allows a dependency injection-way of defining a reverse lookup function, takes a string address (should be an IP) and returns a string that contains the domain name result
Click to show internal directories.
Click to hide internal directories.