wip: start container version of server
This commit is contained in:
committed by
=Michael Hohn
parent
71838d3320
commit
0349961360
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user