refactored/renamed: ScriptRunner => Corredor
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package options
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type (
|
||||
CorredorOpt struct {
|
||||
Enabled bool `env:"CORREDOR_ENABLED"`
|
||||
|
||||
// Also used by corredor service to configure gRPC server
|
||||
Addr string `env:"CORREDOR_ADDR"`
|
||||
|
||||
// Also used by corredor service to enable logging
|
||||
Log bool `env:"CORREDOR_LOG_ENABLED"`
|
||||
|
||||
MaxBackoffDelay time.Duration `env:"CORREDOR_MAX_BACKOFF_DELAY"`
|
||||
Log bool `env:"CORREDOR_LOG_ENABLED"`
|
||||
}
|
||||
)
|
||||
|
||||
func Corredor(pfix string) (o *CorredorOpt) {
|
||||
o = &CorredorOpt{
|
||||
Enabled: false,
|
||||
Addr: "corredor:80",
|
||||
MaxBackoffDelay: time.Minute,
|
||||
Log: false,
|
||||
}
|
||||
|
||||
fill(o, pfix)
|
||||
|
||||
return
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package options
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type (
|
||||
ScriptRunnerOpt struct {
|
||||
Enabled bool `env:"SCRIPT_RUNNER_ENABLED"`
|
||||
Addr string `env:"SCRIPT_RUNNER_ADDR"`
|
||||
MaxBackoffDelay time.Duration `env:"SCRIPT_RUNNER_MAX_BACKOFF_DELAY"`
|
||||
Log bool `env:"SCRIPT_RUNNER_LOG"`
|
||||
}
|
||||
)
|
||||
|
||||
func ScriptRunner(pfix string) (o *ScriptRunnerOpt) {
|
||||
o = &ScriptRunnerOpt{
|
||||
Enabled: false,
|
||||
Addr: "corredor:80",
|
||||
MaxBackoffDelay: time.Minute,
|
||||
Log: false,
|
||||
}
|
||||
|
||||
fill(o, pfix)
|
||||
|
||||
return
|
||||
}
|
||||
+2
-2
@@ -50,7 +50,7 @@ type (
|
||||
ProvisionOpt *options.ProvisionOpt
|
||||
SentryOpt *options.SentryOpt
|
||||
StorageOpt *options.StorageOpt
|
||||
ScriptRunner *options.ScriptRunnerOpt
|
||||
ScriptRunner *options.CorredorOpt
|
||||
|
||||
// Services will be calling each other so we need
|
||||
// to keep the config opts spearated
|
||||
@@ -195,7 +195,7 @@ func (c *Config) Init() {
|
||||
c.ProvisionOpt = options.Provision(c.ServiceName)
|
||||
c.SentryOpt = options.Sentry(c.EnvPrefix)
|
||||
c.StorageOpt = options.Storage(c.EnvPrefix)
|
||||
c.ScriptRunner = options.ScriptRunner(c.EnvPrefix)
|
||||
c.ScriptRunner = options.Corredor(c.EnvPrefix)
|
||||
c.GRPCServerSystem = options.GRPCServer("system")
|
||||
// c.GRPCServerCompose = options.GRPCServer("compose")
|
||||
// c.GRPCServerMessagign = options.GRPCServer("messaging")
|
||||
|
||||
Reference in New Issue
Block a user