feat(assist-api): added the missing config
This commit is contained in:
parent
96f58b94d5
commit
9c0f50b2fb
1 changed files with 27 additions and 0 deletions
27
ee/backend/internal/config/assist/config.go
Normal file
27
ee/backend/internal/config/assist/config.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue