server

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func StartPlatformAPIServer

func StartPlatformAPIServer(cfg *config.Server, slogger *slog.Logger) (*Server, error)

StartPlatformAPIServer creates a new server instance with all dependencies initialized

func (*Server) GetMux

func (s *Server) GetMux() *http.ServeMux

GetMux returns the raw ServeMux for testing purposes.

func (*Server) Start

func (s *Server) Start(httpCfg config.HTTPListener, httpsCfg config.HTTPSListener, timeouts config.Timeouts) error

Start brings up the enabled listeners. The plain-HTTP and TLS listeners are independent: either or both may run, each on its own port. This mirrors the gateway router's http/https listener split. At least one listener must be enabled.

timeouts bounds connection lifetime on both listeners so a slow or idle peer cannot hold one open indefinitely (Slowloris). It is validated at config load.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL