|
|
@@ -1,4 +1,5 @@
|
|
|
package config
|
|
|
+
|
|
|
// code for managing groundseg and container configurations
|
|
|
|
|
|
import (
|
|
|
@@ -17,25 +18,25 @@ import (
|
|
|
)
|
|
|
|
|
|
var (
|
|
|
- logger = slog.New(slog.NewJSONHandler(os.Stdout, nil))
|
|
|
+ logger = slog.New(slog.NewJSONHandler(os.Stdout, nil))
|
|
|
// global settings config (accessed via funcs)
|
|
|
- globalConfig structs.SysConfig
|
|
|
+ globalConfig structs.SysConfig
|
|
|
// base path for installation (override default with env var)
|
|
|
- BasePath = os.Getenv("GS_BASE_PATH")
|
|
|
+ BasePath = os.Getenv("GS_BASE_PATH")
|
|
|
// only amd64 or arm64
|
|
|
- Architecture = getArchitecture()
|
|
|
+ Architecture = getArchitecture()
|
|
|
// struct of /retrieve blob
|
|
|
StartramConfig structs.StartramRetrieve
|
|
|
// unused for now, set with `./groundseg dev`
|
|
|
- DebugMode = false
|
|
|
- Ready = false
|
|
|
+ DebugMode = false
|
|
|
+ Ready = false
|
|
|
// representation of desired/actual container states
|
|
|
- GSContainers = make(map[string]structs.ContainerState)
|
|
|
+ GSContainers = make(map[string]structs.ContainerState)
|
|
|
// version server check
|
|
|
- checkInterval = 5 * time.Minute
|
|
|
- confMutex sync.Mutex
|
|
|
- contMutex sync.Mutex
|
|
|
- versMutex sync.Mutex
|
|
|
+ checkInterval = 5 * time.Minute
|
|
|
+ confMutex sync.Mutex
|
|
|
+ contMutex sync.Mutex
|
|
|
+ versMutex sync.Mutex
|
|
|
)
|
|
|
|
|
|
// try initializing from system.json on disk
|