server

package
v0.0.0-...-d80aada Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package server provides application initialization and lifecycle management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Verbose        bool
	DisableColors  bool
	DisableMemory  bool
	GracefulPeriod time.Duration
}

Config holds server configuration options.

type Server

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

Server manages the application lifecycle and dependencies.

func New

func New(cfg Config) (*Server, error)

New creates a new server instance with all dependencies initialized.

func (*Server) GetAIService

func (s *Server) GetAIService() ai.Client

GetAIService returns the AI service.

func (*Server) GetAssistant

func (s *Server) GetAssistant() assistant.Assistant

GetAssistant returns the assistant instance.

func (*Server) GetConfig

func (s *Server) GetConfig() config.Config

GetConfig returns the configuration.

func (*Server) GetDatabase

func (s *Server) GetDatabase() *pgxpool.Pool

GetDatabase returns the database connection pool.

func (*Server) GetLogger

func (s *Server) GetLogger() logger.Logger

GetLogger returns the logger.

func (*Server) GetTemporalClient

func (s *Server) GetTemporalClient() client.Client

GetTemporalClient returns the Temporal client.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run starts the server and blocks until shutdown.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the server.

Jump to

Keyboard shortcuts

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