Documentation ¶
Index ¶
- type Server
- func (s *Server) ListenForShutdownSignals()
- func (s *Server) SetupServer(pc config.PortConfig) *http.Server
- func (s *Server) StartHTTPServer(server *http.Server, pc config.PortConfig) error
- func (s *Server) StartServers() error
- func (s *Server) StartTLSServer(server *http.Server, pc config.PortConfig) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { Cache *sql.DB CacheDuration int Interface string Config *config.Config EventLogger *logger.Logger LLMConfig llm.Config Logger *logrus.Logger Model llms.Model Servers map[uint16]*http.Server }
Server holds the configuration and components for running HTTP/TLS servers.
func (*Server) ListenForShutdownSignals ¶
func (s *Server) ListenForShutdownSignals()
ListenForShutdownSignals handles graceful shutdown on receiving signals.
func (*Server) SetupServer ¶
func (s *Server) SetupServer(pc config.PortConfig) *http.Server
SetupServer configures the server with the provided settings.
func (*Server) StartHTTPServer ¶
StartHTTPServer starts the configured HTTP server.
func (*Server) StartServers ¶
StartServers starts all servers defined in the configuration.
func (*Server) StartTLSServer ¶
StartTLSServer starts the configured TLS server.
Click to show internal directories.
Click to hide internal directories.