Versions in this module Expand all Collapse all v0 v0.0.2 Oct 1, 2023 v0.0.1 Sep 30, 2023 Changes in this version + type Config struct + ConfigModified func() + Enabled bool + Filename string + HTTPRegister aghhttp.RegisterFunc + Ignored *aghnet.IgnoreEngine + Limit time.Duration + ShouldCountClient func([]string) bool + UnitID UnitIDGenFunc + type Entry struct + Client string + Domain string + Result Result + Time time.Duration + Upstream string + type Interface interface + ShouldCount func(host string, qType, qClass uint16, ids []string) bool + Start func() + TopClientsIP func(limit uint) []netip.Addr + Update func(e *Entry) + WriteDiskConfig func(dc *Config) + type Result int + const RFiltered + const RNotFiltered + const RParental + const RSafeBrowsing + const RSafeSearch + type StatsCtx struct + func New(conf Config) (s *StatsCtx, err error) + func (s *StatsCtx) Close() (err error) + func (s *StatsCtx) ShouldCount(host string, _, _ uint16, ids []string) bool + func (s *StatsCtx) Start() + func (s *StatsCtx) TopClientsIP(maxCount uint) (ips []netip.Addr) + func (s *StatsCtx) Update(e *Entry) + func (s *StatsCtx) WriteDiskConfig(dc *Config) + type StatsResp struct + AvgProcessingTime float64 + BlockedFiltering []uint64 + DNSQueries []uint64 + NumBlockedFiltering uint64 + NumDNSQueries uint64 + NumReplacedParental uint64 + NumReplacedSafebrowsing uint64 + NumReplacedSafesearch uint64 + ReplacedParental []uint64 + ReplacedSafebrowsing []uint64 + TimeUnits string + TopBlocked []topAddrs + TopClients []topAddrs + TopQueried []topAddrs + TopUpstreamsAvgTime []topAddrsFloat + TopUpstreamsResponses []topAddrs + type UnitIDGenFunc func() (id uint32)