Documentation
¶
Overview ¶
Copyright (c) 2025 EterLine (Andrew) This file is part of fstmon. Licensed under the MIT License. See the LICENSE file for details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServerTlsConfig ¶
NewServerTlsConfig – creates or returns singleton TLS config for servers. PreferServerCipherSuites is always true. Min TLS 1.2, Max TLS 1.3.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server – HTTP server wrapper with optional TLS and graceful shutdown.
Holds underlying http.Server and provides Run and Close methods.
func NewServer ¶
func NewServer(handler http.Handler, opts ...ServerOption) *Server
NewServer – creates a new Server with given HTTP handler and options.
type ServerOption ¶
type ServerOption func(*Server)
ServerOption – functional option type for configuring Server.
func WithDisabledDefaultHttp2Map ¶
func WithDisabledDefaultHttp2Map() ServerOption
WithDisabledDefaultHttp2Map – disable default HTTP/2 map.
func WithShutdownTimeout ¶
func WithShutdownTimeout(d time.Duration) ServerOption
WithShutdownTimeout – sets shutdown timeout duration.
func WithTLS ¶
func WithTLS(cfg *tls.Config) ServerOption
WithTLS – enables TLS with provided tls.Config.