add configuration support for self overrides

This commit is contained in:
Jordan Whited
2021-01-01 17:15:04 -08:00
committed by Jordan Whited
parent 6f78170fbe
commit 77622af207
3 changed files with 132 additions and 31 deletions

View File

@@ -16,7 +16,11 @@ import (
)
// coredns plugin-specific logger
var logger = clog.NewWithPlugin("wgsd")
var logger = clog.NewWithPlugin(pluginName)
const (
pluginName = "wgsd"
)
// WGSD is a CoreDNS plugin that provides WireGuard peer information via DNS-SD
// semantics. WGSD implements the plugin.Handler interface.
@@ -300,5 +304,5 @@ func soa(zone string) dns.RR {
}
func (p *WGSD) Name() string {
return "wgsd"
return pluginName
}