Setup #1
5
main.go
5
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
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user