Documentation
¶
Index ¶
- type CertManager
- type Server
- func (s *Server) ListenAndServeDNS(ctx context.Context, network string) error
- func (s *Server) ListenAndServeDNSTLS(ctx context.Context) error
- func (s *Server) ListenAndServeH3(ctx context.Context) error
- func (s *Server) ListenAndServeHTTPTLS(ctx context.Context) error
- func (s *Server) ListenAndServeQUIC(ctx context.Context) error
- func (s *Server) ReloadCertificate() error
- func (s *Server) Run(ctx context.Context)
- func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) Stop()
- func (s *Server) Stopped() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertManager ¶ added in v1.6.0
type CertManager struct {
// contains filtered or unexported fields
}
CertManager manages TLS certificates with automatic reloading
func NewCertManager ¶ added in v1.6.0
func NewCertManager(certPath, keyPath string) (*CertManager, error)
NewCertManager creates a new certificate manager
func (*CertManager) GetCertificate ¶ added in v1.6.0
func (cm *CertManager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificate returns the current certificate
func (*CertManager) GetTLSConfig ¶ added in v1.6.0
func (cm *CertManager) GetTLSConfig() *tls.Config
GetTLSConfig returns a TLS config that uses dynamic certificate loading Each call returns a fresh config to avoid race conditions
func (*CertManager) Reload ¶ added in v1.6.0
func (cm *CertManager) Reload() error
Reload forces a certificate reload
func (*CertManager) Stop ¶ added in v1.6.0
func (cm *CertManager) Stop()
Stop stops the certificate manager and waits for cleanup
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server type.
func (*Server) ListenAndServeDNS ¶
(*Server).ListenAndServeDNS listenAndServeDNS Starts a server on address and network specified Invoke handler for incoming queries.
func (*Server) ListenAndServeDNSTLS ¶
(*Server).ListenAndServeDNSTLS listenAndServeDNSTLS acts like http.ListenAndServeTLS.
func (*Server) ListenAndServeH3 ¶ added in v1.3.2
(*Server).ListenAndServeH3 listenAndServeH3.
func (*Server) ListenAndServeHTTPTLS ¶
(*Server).ListenAndServeHTTPTLS listenAndServeHTTPTLS acts like http.ListenAndServeTLS.
func (*Server) ListenAndServeQUIC ¶ added in v1.3.2
(*Server).ListenAndServeQUIC listenAndServeQUIC.
func (*Server) ReloadCertificate ¶ added in v1.6.0
ReloadCertificate forces a certificate reload on all TLS servers