wip: start container version of server

This commit is contained in:
Michael Hohn
2024-06-04 12:24:42 -07:00
committed by =Michael Hohn
parent 71838d3320
commit 0349961360
7 changed files with 430 additions and 24 deletions

View File

@@ -85,7 +85,28 @@ func main() {
sc.Setup(&state) // sc is part of state and dereferences it
case "container":
// Assemble cccontainer
// Assemble container version
sq := queue.NewQueueSingle(2) // FIXME take value from configuration
sc := server.NewCommanderSingle(nil, sq)
sl := logger.NewLoggerSingle()
ss, err := storage.NewStorageContainer(config.Storage.StartingID)
if err != nil {
slog.Error("Unable to initialize storage")
os.Exit(1)
}
sr := agent.NewRunnerSingle(2, sq) // FIXME take value from configuration
state := server.State{
Commander: sc,
Logger: sl,
Queue: sq,
Storage: ss,
Runner: sr,
}
sc.Setup(&state) // sc is part of state and dereferences it
case "cluster":
// Assemble cccluster
default: