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) {
|
func startRunner(runner, globalCfg, serviceCfg string) {
|
||||||
var fn func(cfg app.Config) error
|
var fn func(cfg app.Config) error
|
||||||
|
|
||||||
|
if runner == "" {
|
||||||
|
runner = "service"
|
||||||
|
}
|
||||||
|
|
||||||
switch runner {
|
switch runner {
|
||||||
case "service":
|
case "service":
|
||||||
fn = service.Runner
|
fn = service.Runner
|
||||||
|
|||||||
@ -36,6 +36,10 @@ type Service struct {
|
|||||||
AuthorizedServices map[string]AuthorizedService `toml:"AuthorizedServices"`
|
AuthorizedServices map[string]AuthorizedService `toml:"AuthorizedServices"`
|
||||||
APIBasePort string
|
APIBasePort string
|
||||||
EnableJWTAuth bool // Enable JWT authentication for service-to-service communication
|
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 {
|
type ExtAuth struct {
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package version
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"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
|
var environment EnvironmentType //nolint:gochecknoglobals // Just keept this global to avoid having to create an instance
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
aux := os.Getenv(quantexEnvironment)
|
// aux := os.Getenv(quantexEnvironment)
|
||||||
if aux == "" {
|
// if aux == "" {
|
||||||
panic("QUANTEX_ENVIRONMENT is not set")
|
// panic("QUANTEX_ENVIRONMENT is not set")
|
||||||
}
|
// }
|
||||||
|
|
||||||
env, err := ParseEnvironmentType(aux)
|
// env, err := ParseEnvironmentType(aux)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
panic("Invalid QUANTEX_ENVIRONMENT value: " + aux + " " + err.Error())
|
// panic("Invalid QUANTEX_ENVIRONMENT value: " + aux + " " + err.Error())
|
||||||
}
|
// }
|
||||||
|
|
||||||
environment = env
|
environment = EnvironmentTypeDev
|
||||||
}
|
}
|
||||||
|
|
||||||
// Base returns the version base name
|
// Base returns the version base name
|
||||||
|
|||||||
Reference in New Issue
Block a user