diff --git a/main.go b/main.go index 7817b1c..d8c199b 100644 --- a/main.go +++ b/main.go @@ -178,6 +178,11 @@ func parseLogLevel(level string) (slog.Level, error) { func startRunner(runner, globalCfg, serviceCfg string) { var fn func(cfg app.Config) error + + if runner == "" { + runner = "service" + } + switch runner { case "service": fn = service.Runner diff --git a/src/app/model.go b/src/app/model.go index 1c437db..8079dbc 100644 --- a/src/app/model.go +++ b/src/app/model.go @@ -36,6 +36,10 @@ type Service struct { AuthorizedServices map[string]AuthorizedService `toml:"AuthorizedServices"` APIBasePort string EnableJWTAuth bool // Enable JWT authentication for service-to-service communication + FIX FIXConfig +} +type FIXConfig struct { + SettingsFile string // path to fix.cfg file } type ExtAuth struct { diff --git a/src/app/version/version.go b/src/app/version/version.go index 720a634..0ad9b56 100644 --- a/src/app/version/version.go +++ b/src/app/version/version.go @@ -3,7 +3,6 @@ package version import ( "fmt" - "os" "runtime" "strings" ) @@ -38,17 +37,17 @@ type EnvironmentType int //nolint:recvcheck // The methods of this are autogener var environment EnvironmentType //nolint:gochecknoglobals // Just keept this global to avoid having to create an instance func init() { - aux := os.Getenv(quantexEnvironment) - if aux == "" { - panic("QUANTEX_ENVIRONMENT is not set") - } + // aux := os.Getenv(quantexEnvironment) + // if aux == "" { + // panic("QUANTEX_ENVIRONMENT is not set") + // } - env, err := ParseEnvironmentType(aux) - if err != nil { - panic("Invalid QUANTEX_ENVIRONMENT value: " + aux + " " + err.Error()) - } + // env, err := ParseEnvironmentType(aux) + // if err != nil { + // panic("Invalid QUANTEX_ENVIRONMENT value: " + aux + " " + err.Error()) + // } - environment = env + environment = EnvironmentTypeDev } // Base returns the version base name