plugin/bind: exclude interface or ip address (#4543)

* plugin/bind: exclude interface or ip address

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* fix README.md

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Apply suggestions, Fix test

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Apply suggestions, move errs to setup

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
This commit is contained in:
Mohammad Yosefpor 2021-03-25 20:08:17 +04:30 committed by GitHub
parent 5b9b079dab
commit ea41dd23a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 123 additions and 35 deletions

View file

@ -1,6 +1,17 @@
// Package bind allows binding to a specific interface instead of bind to all of them.
package bind
import "github.com/coredns/coredns/plugin"
import (
"github.com/coredns/coredns/plugin"
)
func init() { plugin.Register("bind", setup) }
type bind struct {
Next plugin.Handler
addrs []string
except []string
}
// Name implements plugin.Handler.
func (b *bind) Name() string { return "bind" }