uint16 type for port + env getter
This commit is contained in:
parent
979c7c4a4f
commit
f70d53c75c
2 changed files with 14 additions and 3 deletions
|
|
@ -29,7 +29,7 @@ type TasksSource struct {
|
|||
|
||||
type Rabbit struct {
|
||||
Host string
|
||||
Port string
|
||||
Port uint16
|
||||
User string
|
||||
Pass string
|
||||
Vhost string
|
||||
|
|
@ -40,7 +40,7 @@ func NewConfig() Config {
|
|||
App: App{
|
||||
Mode: getEnv("APP_MODE", "dev"),
|
||||
LogLvl: getEnv("APP_LOG_LVL", "debug"),
|
||||
CheckPeriod: getEnvSeconds("APP_CHECK_PERIOD_SECONDS", 20),
|
||||
CheckPeriod: getEnvSeconds("APP_CHECK_PERIOD_SECONDS", 60*60*6),
|
||||
ProcChanLen: getEnvUint("APP_PROCESSOR_CHANNEL_SIZE", 100),
|
||||
},
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ func NewConfig() Config {
|
|||
|
||||
Rabbit: Rabbit{
|
||||
Host: getEnv("RABBIT_HOST", "10.0.0.4"),
|
||||
Port: getEnv("RABBIT_PORT", "5672"),
|
||||
Port: getEnvPort("RABBIT_PORT", 5672),
|
||||
User: getEnv("RABBIT_USER", "taskProcessorDev"),
|
||||
Pass: getEnv("RABBIT_PASS", "pass1234"),
|
||||
Vhost: getEnv("RABBIT_VHOST", "taskProcessorDevHost"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue