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