mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(arch): add log partitioning and provider delete sync
This commit is contained in:
@@ -45,6 +45,7 @@ type LogConfig struct {
|
||||
RetentionDays int
|
||||
MaxRecords int
|
||||
DSN string
|
||||
Partitioning string
|
||||
}
|
||||
|
||||
type ModelRegistryConfig struct {
|
||||
@@ -79,6 +80,7 @@ func Load() (*Config, error) {
|
||||
v.SetDefault("log.retention_days", 30)
|
||||
v.SetDefault("log.max_records", 1000000)
|
||||
v.SetDefault("log.dsn", "")
|
||||
v.SetDefault("log.partitioning", "off")
|
||||
v.SetDefault("auth.jwt_secret", "change_me_in_production")
|
||||
v.SetDefault("model_registry.enabled", false)
|
||||
v.SetDefault("model_registry.refresh_seconds", 1800)
|
||||
@@ -104,6 +106,7 @@ func Load() (*Config, error) {
|
||||
_ = v.BindEnv("log.retention_days", "EZ_LOG_RETENTION_DAYS")
|
||||
_ = v.BindEnv("log.max_records", "EZ_LOG_MAX_RECORDS")
|
||||
_ = v.BindEnv("log.dsn", "EZ_LOG_PG_DSN")
|
||||
_ = v.BindEnv("log.partitioning", "EZ_LOG_PARTITIONING")
|
||||
_ = v.BindEnv("auth.jwt_secret", "EZ_JWT_SECRET")
|
||||
_ = v.BindEnv("model_registry.enabled", "EZ_MODEL_REGISTRY_ENABLED")
|
||||
_ = v.BindEnv("model_registry.refresh_seconds", "EZ_MODEL_REGISTRY_REFRESH_SECONDS")
|
||||
@@ -149,6 +152,7 @@ func Load() (*Config, error) {
|
||||
RetentionDays: v.GetInt("log.retention_days"),
|
||||
MaxRecords: v.GetInt("log.max_records"),
|
||||
DSN: strings.TrimSpace(v.GetString("log.dsn")),
|
||||
Partitioning: strings.TrimSpace(v.GetString("log.partitioning")),
|
||||
},
|
||||
Auth: AuthConfig{
|
||||
JWTSecret: v.GetString("auth.jwt_secret"),
|
||||
|
||||
Reference in New Issue
Block a user