Api Struct + Nano env

This commit is contained in:
mr
2026-04-23 09:48:39 +02:00
parent 9c2663601a
commit e70e89b630
2 changed files with 35 additions and 21 deletions

View File

@@ -9,6 +9,9 @@ import "sync"
// ===================================================
type Config struct {
IsApi bool
IsNano bool
APIPort int
NATSUrl string
MongoUrl string
@@ -48,10 +51,13 @@ func GetConfig() *Config {
return instance
}
func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string, logLevel string, port int,
func SetConfig(isNano bool, isAPI bool, mongoUrl string, database string, natsUrl string, lokiUrl string, logLevel string, port int,
pkPath, ppPath,
internalCatalogAPI, internalSharedAPI, internalWorkflowAPI, internalWorkspaceAPI,
internalPeerAPI, internalDatacenterAPI string, internalSchedulerAPI string) *Config {
GetConfig().IsNano = isNano
GetConfig().IsApi = isAPI
GetConfig().MongoUrl = mongoUrl
GetConfig().MongoDatabase = database
GetConfig().NATSUrl = natsUrl