plugin/forward: configurable domain support for healthcheck (#5281)
* plugin/forward: configurable domain support for healthcheck Signed-off-by: hansedong <admin@yinxiaoluo.com>
This commit is contained in:
parent
e60c179194
commit
0622a6c66c
7 changed files with 113 additions and 35 deletions
|
@ -56,7 +56,7 @@ type Forward struct {
|
|||
|
||||
// New returns a new Forward.
|
||||
func New() *Forward {
|
||||
f := &Forward{maxfails: 2, tlsConfig: new(tls.Config), expire: defaultExpire, p: new(random), from: ".", hcInterval: hcInterval, opts: options{forceTCP: false, preferUDP: false, hcRecursionDesired: true}}
|
||||
f := &Forward{maxfails: 2, tlsConfig: new(tls.Config), expire: defaultExpire, p: new(random), from: ".", hcInterval: hcInterval, opts: options{forceTCP: false, preferUDP: false, hcRecursionDesired: true, hcDomain: "."}}
|
||||
return f
|
||||
}
|
||||
|
||||
|
@ -234,6 +234,7 @@ type options struct {
|
|||
forceTCP bool
|
||||
preferUDP bool
|
||||
hcRecursionDesired bool
|
||||
hcDomain string
|
||||
}
|
||||
|
||||
var defaultTimeout = 5 * time.Second
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue