wip: start lcmem.go

This commit is contained in:
Michael Hohn
2024-05-13 11:26:35 -07:00
committed by =Michael Hohn
parent d38b561309
commit c2480dc2f1
3 changed files with 147 additions and 186 deletions

View File

@@ -59,6 +59,11 @@ func main() {
// Read configuration
config := mcc.LoadConfig("cconfig.toml")
// Output configuration summary
log.Printf("Help: %t\n", *helpFlag)
log.Printf("Log Level: %s\n", *logLevel)
log.Printf("Mode: %s\n", *mode)
// Apply 'mode' flag
switch *mode {
case "standalone":
@@ -70,6 +75,9 @@ func main() {
Storage: lsmem.Storage{},
Runner: lrmem.Runner{},
}
main := lcmem.Commander{}
main.Setup(state)
main.Run(state)
case "container":
// Assemble cccontainer
@@ -80,11 +88,4 @@ func main() {
os.Exit(1)
}
// Output configuration summary
log.Printf("Help: %t\n", *helpFlag)
log.Printf("Log Level: %s\n", *logLevel)
log.Printf("Mode: %s\n", *mode)
// Run in the chosen mode
}