Moved updater into server
While we're only reacting to containers going away, it's more convenient to bundle the docker events watcher into the server. I've added a flag to switch it on; and switched it on by default in the container. I also implemented `Zone.DeleteRecordsFor(ident)`, which removes all records for a particular container. One minor change to the structure of the code is that the Zone is now constructed *outside* the server, and given to it and the updater.
This commit is contained in:
1 parent
0fb4bce24d
commit
0749460652
9 files changed
+102
-72
No files matched your search
+1
-2
@@ -100,9 +100,8 @@ func notUsHandler() dns.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
func StartServer(ifaceName string, dnsPort int, httpPort int, wait int) error {
|
||||
func StartServer(zone Zone, ifaceName string, dnsPort int, httpPort int, wait int) error {
|
||||
|
||||
var zone = new(ZoneDb)
|
||||
go ListenHttp(zone, httpPort)
|
||||
|
||||
var iface *net.Interface = nil
|
||||
|
||||
Reference in new issue
Block a user