aboutsummaryrefslogtreecommitdiff
path: root/environment.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-12-19 14:46:34 +0700
committerShulhan <ms@kilabit.info>2021-12-19 14:46:34 +0700
commita29a8c8396fc16af744a0abc86b5aca343aa620a (patch)
tree9254b2524eb7ff2ecdedb830562bad5b6c5bcc79 /environment.go
parent7ee3e4ea4658e85a40540212b95206b09686feb7 (diff)
downloadrescached-a29a8c8396fc16af744a0abc86b5aca343aa620a.tar.xz
all: realign all structs
This minimize storage size allocated by * hostBlocks: from 88 to 80 bytes (-8 bytes) * Environment: from 344 to 288 bytes (-56 bytes)
Diffstat (limited to 'environment.go')
-rw-r--r--environment.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/environment.go b/environment.go
index 21cefd9..3d1bede 100644
--- a/environment.go
+++ b/environment.go
@@ -53,16 +53,19 @@ const (
// Environment for running rescached.
//
type Environment struct {
- dns.ServerOptions
- WUIListen string `ini:"rescached::wui.listen"`
- FileResolvConf string `ini:"rescached::file.resolvconf"`
+ HostsFiles map[string]*dns.HostsFile
+ Zones map[string]*dns.Zone
+
fileConfig string
+ FileResolvConf string `ini:"rescached::file.resolvconf"`
+ WUIListen string `ini:"rescached::wui.listen"`
- Debug int `ini:"rescached::debug"`
HostsBlocksRaw []string `ini:"rescached::hosts_block" json:"-"`
HostsBlocks []*hostsBlock
- HostsFiles map[string]*dns.HostsFile
- Zones map[string]*dns.Zone
+
+ dns.ServerOptions
+
+ Debug int `ini:"rescached::debug"`
}
//