more updates

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2020-01-16 16:39:28 +01:00
parent 09f4e8aee4
commit a231daf17f
5 changed files with 142 additions and 58 deletions

View File

@@ -18,11 +18,9 @@ type Traffic struct {
c *xds.Client
id string
origins []string
Next plugin.Handler
}
// shutdown closes the connection to the managment endpoints and stops any running goroutines.
func (t *Traffic) shutdown() { t.c.Close() }
Next plugin.Handler
}
// ServeDNS implements the plugin.Handler interface.
func (t *Traffic) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
@@ -38,7 +36,6 @@ func (t *Traffic) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
}
}
if cluster == "" {
// TODO(miek): can this actually happen?
return plugin.NextOrFailure(t.Name(), t.Next, ctx, w, r)
}