listeners

package
v0.0.0-...-f17429d Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnabledMailConfigs

func EnabledMailConfigs(db *gorm.DB) ([]notification.MailConfig, error)

EnabledMailConfigs returns enabled email notification channels ordered by SortOrder.

func GetSSLCertificate

func GetSSLCertificate() (tls.Certificate, error)

GetSSLCertificate gets the loaded SSL certificate

func GetTLSConfig

func GetTLSConfig() (*tls.Config, error)

GetTLSConfig gets TLS configuration

func InitApplicationListeners

func InitApplicationListeners(db *gorm.DB, lg *zap.Logger)

InitApplicationListeners registers all process-wide signal listeners (system, user, async pools). Call once after configuration and database are ready.

func InitLLMUsageListener

func InitLLMUsageListener(db *gorm.DB, lg *zap.Logger)

InitLLMUsageListener 订阅 llm.SignalLLMUsage,将用量写入 llm_usage(按 request_id 去重)。

func InitSystemListeners

func InitSystemListeners()

InitSystemListeners initializes system listeners

func InitUserSignalListeners

func InitUserSignalListeners(db *gorm.DB, lg *zap.Logger)

InitUserSignalListeners wires user-related signals: synchronous logging and async side effects (e.g. mail).

func IsSSLEnabled

func IsSSLEnabled() bool

IsSSLEnabled checks if SSL is enabled and certificates are loaded

Types

This section is empty.

Jump to

Keyboard shortcuts

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