func NewCache(config *CacheConfig) *DnsCache { cache := &DnsCache{ cache: collect.NewValidityMap(3600), config: config, } return cache }
func NewRouter(config *RouterRuleConfig) *Router { return &Router{ config: config, cache: collect.NewValidityMap(3600), } }
func NewRouter() *Router { return &Router{ rules: make([]*Rule, 0, 16), cache: collect.NewValidityMap(3600), } }