wip
This commit is contained in:
committed by
=Michael Hohn
parent
9fc07e8c95
commit
12595077c7
@@ -10,7 +10,8 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/advanced-security/mrvacommander/intefaces/mci"
|
||||
"github.com/advanced-security/mrvacommander/config/mcc"
|
||||
"github.com/advanced-security/mrvacommander/interfaces/mci"
|
||||
"github.com/advanced-security/mrvacommander/lib/commander/lcmem"
|
||||
"github.com/advanced-security/mrvacommander/lib/logger/llmem"
|
||||
"github.com/advanced-security/mrvacommander/lib/queue/lqmem"
|
||||
@@ -63,12 +64,12 @@ func main() {
|
||||
switch *mode {
|
||||
case "standalone":
|
||||
// Assemble single-process version
|
||||
state := MCState{
|
||||
commander: lcmem.LCCommander,
|
||||
logger: llmem.LCLogger,
|
||||
queue: lqmem.LCQueue,
|
||||
storage: lsmem.LCStorage,
|
||||
runner: lrmem.LCRunner,
|
||||
state := mci.State{
|
||||
Commander: lcmem.Commander{},
|
||||
Logger: llmem.Logger{},
|
||||
Queue: lqmem.Queue{},
|
||||
Storage: lsmem.Storage{},
|
||||
Runner: lrmem.Runner{},
|
||||
}
|
||||
|
||||
case "container":
|
||||
@@ -89,31 +90,12 @@ func main() {
|
||||
|
||||
}
|
||||
|
||||
type MCCConf struct {
|
||||
}
|
||||
type MCLConf struct {
|
||||
}
|
||||
type MCQConf struct {
|
||||
}
|
||||
type MCSConf struct {
|
||||
}
|
||||
type MCRConf struct {
|
||||
}
|
||||
|
||||
type MCState struct {
|
||||
commander mci.MCCommander
|
||||
logger mci.MCLogger
|
||||
queue mci.MCQueue
|
||||
storage mci.MCStorage
|
||||
runner mci.MCRunner
|
||||
}
|
||||
|
||||
type MCConfig struct {
|
||||
commander MCCConf
|
||||
logger MCLConf
|
||||
queue MCQConf
|
||||
storage MCSConf
|
||||
runner MCRConf
|
||||
commander mcc.Commander
|
||||
logger mcc.Logger
|
||||
queue mcc.Queue
|
||||
storage mcc.Storage
|
||||
runner mcc.Runner
|
||||
}
|
||||
|
||||
func loadConfig(fname string) *MCConfig {
|
||||
|
||||
4
config/mcc/commander.go
Normal file
4
config/mcc/commander.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package mcc
|
||||
|
||||
type Commander struct {
|
||||
}
|
||||
4
config/mcc/common.go
Normal file
4
config/mcc/common.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package mcc
|
||||
|
||||
type Common struct {
|
||||
}
|
||||
4
config/mcc/logger.go
Normal file
4
config/mcc/logger.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package mcc
|
||||
|
||||
type Logger struct {
|
||||
}
|
||||
4
config/mcc/queue.go
Normal file
4
config/mcc/queue.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package mcc
|
||||
|
||||
type Queue struct {
|
||||
}
|
||||
4
config/mcc/runner.go
Normal file
4
config/mcc/runner.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package mcc
|
||||
|
||||
type Runner struct {
|
||||
}
|
||||
4
config/mcc/storage.go
Normal file
4
config/mcc/storage.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package mcc
|
||||
|
||||
type Storage struct {
|
||||
}
|
||||
@@ -1,4 +1,12 @@
|
||||
package mci
|
||||
|
||||
type MCCommander struct {
|
||||
type Commander interface {
|
||||
}
|
||||
|
||||
type State struct {
|
||||
Commander Commander
|
||||
Logger Logger
|
||||
Queue Queue
|
||||
Storage Storage
|
||||
Runner Runner
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package mci
|
||||
|
||||
type MCCommon struct {
|
||||
type Common struct {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package mci
|
||||
|
||||
type MCLogger struct {
|
||||
type Logger interface {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package mci
|
||||
|
||||
type MCQueue struct {
|
||||
type Queue interface {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package mci
|
||||
|
||||
type MCRunner struct {
|
||||
type Runner interface {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package mci
|
||||
|
||||
type MCStorage struct {
|
||||
type Storage interface {
|
||||
}
|
||||
|
||||
@@ -12,6 +12,9 @@ import (
|
||||
"github.com/hohn/ghes-mirva-server/store"
|
||||
)
|
||||
|
||||
type Commander struct {
|
||||
}
|
||||
|
||||
func StatusResponse(w http.ResponseWriter, js co.JobSpec, ji co.JobInfo, vaid int) {
|
||||
slog.Debug("Submitting status response", "session", vaid)
|
||||
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
package llmem
|
||||
|
||||
type Logger struct {
|
||||
}
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
package lqmem
|
||||
|
||||
type Queue struct {
|
||||
}
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
package lrmem
|
||||
|
||||
type Runner struct {
|
||||
}
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
package lsmem
|
||||
|
||||
type Storage struct {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user