Add configuration cache size and other parameters

This commit is contained in:
Frank Denis 2018-01-10 19:32:56 +01:00
parent b60c728067
commit 99c5273e3a
4 changed files with 45 additions and 6 deletions

View file

@ -31,6 +31,10 @@ type PluginsState struct {
responsePlugins *[]Plugin
synthResponse *dns.Msg
dnssec bool
cacheSize int
cacheNegTTL uint32
cacheMinTTL uint32
cacheMaxTTL uint32
}
type Plugin interface {
@ -60,6 +64,10 @@ func NewPluginsState(proxy *Proxy, proto string) PluginsState {
queryPlugins: queryPlugins,
responsePlugins: responsePlugins,
proto: proto,
cacheSize: proxy.cacheSize,
cacheNegTTL: proxy.cacheNegTTL,
cacheMinTTL: proxy.cacheMinTTL,
cacheMaxTTL: proxy.cacheMaxTTL,
}
}