Versions in this module Expand all Collapse all v1 v1.13.4 May 29, 2026 v1.13.3 May 6, 2026 v1.13.2 Apr 4, 2026 v1.13.1 Apr 4, 2026 v1.13.0 Mar 28, 2026 Changes in this version + const DefaultTimeout + const EventTypeConfigLoaded + const EventTypeRequestHandled + const EventTypeRequestReceived + const EventTypeServerStarted + const EventTypeServerStopped + const EventTypeTLSConfigured + const EventTypeTLSEnabled + const ModuleName + var ErrInvalidPort = errors.New("invalid port number") + var ErrNoHandler = errors.New("no HTTP handler available") + var ErrNoSubjectForEventEmission = errors.New("no subject available for event emission") + var ErrRouterServiceNotHandler = errors.New("router service does not implement http.Handler") + var ErrServerNotStarted = errors.New("server not started") + var ErrServerStartTimeout = errors.New("context cancelled while waiting for server to start") + var ErrTLSNoCertificateFile = errors.New("TLS is enabled but no certificate file specified") + var ErrTLSNoDomainsSpecified = errors.New("TLS auto-generation is enabled but no domains specified") + var ErrTLSNoKeyFile = errors.New("TLS is enabled but no key file specified") + func NewHTTPServerModule() modular.Module + type CertificateService interface + GetCertificate func(*tls.ClientHelloInfo) (*tls.Certificate, error) + type HTTPServerConfig struct + Host string + IdleTimeout time.Duration + MaxHeaderBytes int + Port int + ReadTimeout time.Duration + ShutdownTimeout time.Duration + TLS *TLSConfig + WriteTimeout time.Duration + func (c *HTTPServerConfig) Validate() error + type HTTPServerModule struct + func (m *HTTPServerModule) CanReload() bool + func (m *HTTPServerModule) CollectMetrics(_ context.Context) modular.ModuleMetrics + func (m *HTTPServerModule) Constructor() modular.ModuleConstructor + func (m *HTTPServerModule) EmitEvent(ctx context.Context, event cloudevents.Event) error + func (m *HTTPServerModule) GetRegisteredEventTypes() []string + func (m *HTTPServerModule) Init(app modular.Application) error + func (m *HTTPServerModule) Name() string + func (m *HTTPServerModule) PreStop(ctx context.Context) error + func (m *HTTPServerModule) ProvidesServices() []modular.ServiceProvider + func (m *HTTPServerModule) RegisterConfig(app modular.Application) error + func (m *HTTPServerModule) RegisterObservers(subject modular.Subject) error + func (m *HTTPServerModule) Reload(_ context.Context, changes []modular.ConfigChange) error + func (m *HTTPServerModule) ReloadTimeout() time.Duration + func (m *HTTPServerModule) RequiresServices() []modular.ServiceDependency + func (m *HTTPServerModule) Start(ctx context.Context) error + func (m *HTTPServerModule) Stop(ctx context.Context) error + type TLSConfig struct + AutoGenerate bool + CertFile string + Domains []string + Enabled bool + KeyFile string + UseService bool