aboutsummaryrefslogtreecommitdiff
path: root/core/dnsserver/server_https.go
diff options
context:
space:
mode:
authorGravatar Zou Nengren <zounengren@cmss.chinamobile.com> 2020-03-06 16:25:07 +0800
committerGravatar GitHub <noreply@github.com> 2020-03-06 09:25:07 +0100
commita74a209129fd832b1d68c9de1b5d0c265b78c3a1 (patch)
treecc2249ecdc6dafbf191f0be13e22aa370d98750d /core/dnsserver/server_https.go
parentb8e96b61fc1189c3e5240319e470eb7a6d10f3c6 (diff)
downloadcoredns-a74a209129fd832b1d68c9de1b5d0c265b78c3a1.tar.gz
coredns-a74a209129fd832b1d68c9de1b5d0c265b78c3a1.tar.zst
coredns-a74a209129fd832b1d68c9de1b5d0c265b78c3a1.zip
validate object implements the corresponding interface (#3724)
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
Diffstat (limited to 'core/dnsserver/server_https.go')
-rw-r--r--core/dnsserver/server_https.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/dnsserver/server_https.go b/core/dnsserver/server_https.go
index d2515295c..07be746f9 100644
--- a/core/dnsserver/server_https.go
+++ b/core/dnsserver/server_https.go
@@ -14,6 +14,8 @@ import (
"github.com/coredns/coredns/plugin/pkg/response"
"github.com/coredns/coredns/plugin/pkg/reuseport"
"github.com/coredns/coredns/plugin/pkg/transport"
+
+ "github.com/caddyserver/caddy"
)
// ServerHTTPS represents an instance of a DNS-over-HTTPS server.
@@ -44,6 +46,9 @@ func NewServerHTTPS(addr string, group []*Config) (*ServerHTTPS, error) {
return sh, nil
}
+// Compile-time check to ensure Server implements the caddy.GracefulServer interface
+var _ caddy.GracefulServer = &Server{}
+
// Serve implements caddy.TCPServer interface.
func (s *ServerHTTPS) Serve(l net.Listener) error {
s.m.Lock()