feat: 并发池功能

This commit is contained in:
tbphp
2025-07-06 02:00:21 +08:00
parent e6fe973ea4
commit 4dc17c12d5
9 changed files with 298 additions and 137 deletions

View File

@@ -11,6 +11,7 @@ type ConfigManager interface {
GetCORSConfig() CORSConfig
GetPerformanceConfig() PerformanceConfig
GetLogConfig() LogConfig
GetDatabaseConfig() DatabaseConfig
GetEffectiveServerConfig() ServerConfig
GetRedisDSN() string
Validate() error
@@ -61,6 +62,7 @@ type CORSConfig struct {
// PerformanceConfig represents performance configuration
type PerformanceConfig struct {
MaxConcurrentRequests int `json:"maxConcurrentRequests"`
KeyValidationPoolSize int `json:"KeyValidationPoolSize"`
EnableGzip bool `json:"enableGzip"`
}
@@ -72,3 +74,9 @@ type LogConfig struct {
FilePath string `json:"filePath"`
EnableRequest bool `json:"enableRequest"`
}
// DatabaseConfig represents database configuration
type DatabaseConfig struct {
DSN string `json:"dsn"`
AutoMigrate bool `json:"autoMigrate"`
}