feat(assist-api): added the missing config

This commit is contained in:
Alexander 2025-04-14 16:03:28 +02:00
parent 96f58b94d5
commit 9c0f50b2fb

View file

@ -0,0 +1,27 @@
package assist
import (
"time"
"openreplay/backend/internal/config/common"
"openreplay/backend/internal/config/configurator"
"openreplay/backend/internal/config/redis"
"openreplay/backend/pkg/env"
"openreplay/backend/pkg/logger"
)
type Config struct {
common.Config
common.Postgres
redis.Redis
common.HTTP
ProjectExpiration time.Duration `env:"PROJECT_EXPIRATION,default=10m"`
AssistKey string `env:"ASSIST_KEY"`
WorkerID uint16
}
func New(log logger.Logger) *Config {
cfg := &Config{WorkerID: env.WorkerID()}
configurator.Process(log, cfg)
return cfg
}