plugin/forward: add startup health checks with start_failed (#8663)

* plugin/forward: add startup health checks with start_failed

Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>

* test: separate CoreDNS and third-party imports

Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>

---------

Signed-off-by: houyuwushang <180804215+houyuwushang@users.noreply.github.com>
This commit is contained in:
houyuwushang
2026-10-21 11:34:41 +08:00
committed by GitHub
parent 0fe7b08fbb
commit 3cbe6b5269
8 changed files with 250 additions and 12 deletions

View File

@@ -6,7 +6,6 @@ import (
"errors"
"net"
"net/http"
"sync/atomic"
"time"
"github.com/coredns/coredns/plugin/pkg/doh"
@@ -130,7 +129,7 @@ func (h *doqHc) Check(p *Proxy) error {
return err
}
atomic.StoreUint32(&p.fails, 0)
p.resetFails()
return nil
}
@@ -219,7 +218,7 @@ func (h *dnsHc) Check(p *Proxy) error {
return err
}
atomic.StoreUint32(&p.fails, 0)
p.resetFails()
return nil
}
@@ -293,7 +292,7 @@ func (h *dohHc) Check(p *Proxy) error {
return err
}
atomic.StoreUint32(&p.fails, 0)
p.resetFails()
return nil
}