wip: parse & use config file, start Storage struct/interface

This commit is contained in:
Michael Hohn
2024-05-13 12:56:00 -07:00
committed by =Michael Hohn
parent c2480dc2f1
commit 5b324e092a
7 changed files with 34 additions and 20 deletions

View File

@@ -57,7 +57,7 @@ func main() {
}
// Read configuration
config := mcc.LoadConfig("cconfig.toml")
config := mcc.LoadConfig("mcconfig.toml")
// Output configuration summary
log.Printf("Help: %t\n", *helpFlag)
@@ -69,13 +69,13 @@ func main() {
case "standalone":
// Assemble single-process version
state := mci.State{
Commander: lcmem.Commander{},
Logger: llmem.Logger{},
Queue: lqmem.Queue{},
Storage: lsmem.Storage{},
Runner: lrmem.Runner{},
Commander: &lcmem.Commander{},
Logger: &llmem.Logger{},
Queue: &lqmem.Queue{},
Storage: &lsmem.Storage{CurrentID: config.Storage.StartingID},
Runner: &lrmem.Runner{},
}
main := lcmem.Commander{}
main := &lcmem.Commander{}
main.Setup(state)
main.Run(state)