Add memcache config entries
This commit is contained in:
parent
fde6624777
commit
b541f6e371
@ -24,6 +24,9 @@ port = 6379
|
||||
db = 0
|
||||
password =""
|
||||
|
||||
[memcache]
|
||||
servers = ["127.0.0.1:11211"]
|
||||
|
||||
[log]
|
||||
stdout = true
|
||||
file = "./godns.log"
|
||||
@ -32,7 +35,7 @@ level = "INFO" #DEBUG | INFO |NOTICE | WARN | ERROR
|
||||
|
||||
|
||||
[cache]
|
||||
# backend option [memory|redis]
|
||||
# backend option [memory|memcache|redis]
|
||||
# redis backend not implemented yet
|
||||
backend = "memory"
|
||||
expire = 600 # 10 minutes
|
||||
|
@ -27,6 +27,7 @@ type Settings struct {
|
||||
Server DNSServerSettings `toml:"server"`
|
||||
ResolvConfig ResolvSettings `toml:"resolv"`
|
||||
Redis RedisSettings `toml:"redis"`
|
||||
Memcache MemcacheSettings `toml:"memcache"`
|
||||
Log LogSettings `toml:"log"`
|
||||
Cache CacheSettings `toml:"cache"`
|
||||
Hosts HostsSettings `toml:"hosts"`
|
||||
@ -50,6 +51,10 @@ type RedisSettings struct {
|
||||
Password string
|
||||
}
|
||||
|
||||
type MemcacheSettings struct {
|
||||
Servers []string
|
||||
}
|
||||
|
||||
func (s RedisSettings) Addr() string {
|
||||
return s.Host + ":" + strconv.Itoa(s.Port)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user