app

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

internal/app/app.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDIContainer

func GetDIContainer() *di.Container

GetDIContainer 返回依赖注入容器

func InitServices

func InitServices() error

初始化服务

func Initialize

func Initialize(configPath string) error

Initialize 初始化应用

func IsDebugMode

func IsDebugMode() bool

IsDebugMode 检查是否处于调试模式

func ReinitializeLLMService added in v1.3.1

func ReinitializeLLMService() error

ReinitializeLLMService 重新初始化LLM服务(在配置更新后调用)

func Run

func Run() error

Run 启动应用

Types

type App

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

App 代表应用程序实例

func GetApp

func GetApp() *App

获取应用实例(单例模式)

func (*App) GetConfig

func (a *App) GetConfig() *config.AppConfig

GetConfig 返回应用配置

func (*App) Shutdown

func (a *App) Shutdown() error

Shutdown 优雅关闭服务器

type HTTPServer

type HTTPServer interface {
	ListenAndServe() error
	Shutdown(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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