generalized event handler

This commit is contained in:
Darien Raymond committed 2017-11-28 23:41:20 +01:00
1 parent 973ce07db9
commit fd8db49dc9
16 files changed
+80 -32

No files matched your search

+1 -1
View File
@@ -52,7 +52,7 @@ func NewCacheServer(ctx context.Context, config *dns.Config) (*CacheServer, erro
servers: make([]NameServer, len(config.NameServers)),
hosts: config.GetInternalHosts(),
}
space.OnInitialize(func() error {
space.On(app.SpaceInitializing, func(interface{}) error {
disp := dispatcher.FromSpace(space)
if disp == nil {
return newError("dispatcher is not found in the space")