Documentation
¶
Index ¶
Constants ¶
View Source
const ( ServerNameDefault = "server" ServerNameDebug = "debug" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewHTTPServer ¶
func NewHTTPServer(name string, logger *slog.Logger, conf config.HTTP, fnHandler *http.ServeMux) *Server
NewHTTPServer creates a new Server instance configured with the given name, logger and HTTP configuration. fnHandler is registered as the HTTP handler for the server. The returned server can optionally serve TLS depending on the configuration.
func (*Server) GetCertificateFunc ¶ added in v1.17.0
func (s *Server) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificateFunc returns a function compatible with tls.Config.GetCertificate. It serves the currently loaded TLS certificate and allows hot reloading.
Click to show internal directories.
Click to hide internal directories.