Versions in this module Expand all Collapse all v1 v1.0.1 Sep 20, 2026 v1.0.0 Sep 16, 2026 Changes in this version + const DefaultIdleTimeout + const DefaultMaxHeaderBytes + const DefaultReadHeaderTimeout + const DefaultReadTimeout + const DefaultServerPort + const DefaultShutdownTimeout + const DefaultWriteTimeout + func StartHttpServer(serverconfig *ServerConfig) + type ApiMinifyConfig struct + IsEnabled bool + KeyMap *sync.Map + type CorsOptions struct + AllowCredentials bool + AllowedHeaders []string + AllowedMethods []string + AllowedOrigins []string + MaxAge int + type HTTPServer struct + func NewHTTPServer(serverconfig *ServerConfig) (*HTTPServer, error) + func (s *HTTPServer) Addr() string + func (s *HTTPServer) ListenAndServe() error + func (s *HTTPServer) Router() router.Router + func (s *HTTPServer) Server() *http.Server + func (s *HTTPServer) SessionManager() *session.Manager + func (s *HTTPServer) Shutdown(ctx context.Context) error + func (s *HTTPServer) Start() error + type HttpRoute struct + EnableMinify bool + HttpHandler http.HandlerFunc + Middlewares []middleware.MiddlewareFn + RequestMethod string + UrlRoute string + type ServerConfig struct + AccessLogger logger.Logger + ApiMinifyConfig *ApiMinifyConfig + BGWorkers []*workers.WorkerConfig + BaseContext func(net.Listener) context.Context + ConnContext func(context.Context, net.Conn) context.Context + CorsOptions *CorsOptions + ErrorLog *stdlog.Logger + ErrorLogger logger.Logger + HttpRoutes []*HttpRoute + IdleTimeout time.Duration + MaxHeaderBytes int + Middlewares []func(http.Handler) http.Handler + ReadHeaderTimeout time.Duration + ReadTimeout time.Duration + RouteProvider string + ServerLogger logger.Logger + ServerPort int64 + SessionConfig *session.Config + SessionManager *session.Manager + ShutdownHook func() + ShutdownTimeout time.Duration + TLSCertFile string + TLSConfig *tls.Config + TLSKeyFile string + WorkerSleepTimeout time.Duration + WriteTimeout time.Duration + func (s *ServerConfig) Normalize() error + func (s *ServerConfig) Validate() error