plugin/timeouts - Allow ability to configure listening server timeouts (#5784)

This commit is contained in:
Rich
2022-12-28 11:14:16 +00:00
committed by GitHub
parent 6c9b49f5c2
commit e7ad486b50
14 changed files with 369 additions and 14 deletions

View File

@@ -5,6 +5,7 @@ import (
"crypto/tls"
"fmt"
"net/http"
"time"
"github.com/coredns/caddy"
"github.com/coredns/coredns/plugin"
@@ -53,6 +54,11 @@ type Config struct {
// TLSConfig when listening for encrypted connections (gRPC, DNS-over-TLS).
TLSConfig *tls.Config
// Timeouts for TCP, TLS and HTTPS servers.
ReadTimeout time.Duration
WriteTimeout time.Duration
IdleTimeout time.Duration
// TSIG secrets, [name]key.
TsigSecret map[string]string