Repack structures to save some memory

This commit is contained in:
Frank Denis 2020-11-14 14:46:59 +01:00
parent e6fdb08d3d
commit 4fa643ef4d
4 changed files with 164 additions and 163 deletions

View file

@ -64,30 +64,30 @@ var PluginsReturnCodeToString = map[PluginsReturnCode]string{
}
type PluginsState struct {
sessionData map[string]interface{}
action PluginsAction
maxUnencryptedUDPSafePayloadSize int
originalMaxPayloadSize int
maxPayloadSize int
clientProto string
clientAddr *net.Addr
synthResponse *dns.Msg
dnssec bool
cacheSize int
cacheNegMinTTL uint32
cacheNegMaxTTL uint32
cacheMinTTL uint32
cacheMaxTTL uint32
rejectTTL uint32
questionMsg *dns.Msg
qName string
requestStart time.Time
requestEnd time.Time
cacheHit bool
returnCode PluginsReturnCode
clientProto string
serverName string
serverProto string
qName string
clientAddr *net.Addr
synthResponse *dns.Msg
questionMsg *dns.Msg
sessionData map[string]interface{}
action PluginsAction
timeout time.Duration
returnCode PluginsReturnCode
maxPayloadSize int
cacheSize int
originalMaxPayloadSize int
maxUnencryptedUDPSafePayloadSize int
rejectTTL uint32
cacheMaxTTL uint32
cacheNegMaxTTL uint32
cacheNegMinTTL uint32
cacheMinTTL uint32
cacheHit bool
dnssec bool
}
func (proxy *Proxy) InitPluginsGlobals() error {