This commit is contained in:
Michael Hohn
2024-05-10 10:37:44 -07:00
committed by =Michael Hohn
parent 12b9bd9858
commit 9fc07e8c95
22 changed files with 61 additions and 9 deletions

View File

@@ -10,6 +10,12 @@ import (
"os"
"github.com/BurntSushi/toml"
"github.com/advanced-security/mrvacommander/intefaces/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"
"github.com/advanced-security/mrvacommander/lib/runner/lrmem"
"github.com/advanced-security/mrvacommander/lib/storage/lsmem"
)
func main() {
@@ -56,7 +62,15 @@ func main() {
// Apply 'mode' flag
switch *mode {
case "standalone":
// Assemble ccmem
// Assemble single-process version
state := MCState{
commander: lcmem.LCCommander,
logger: llmem.LCLogger,
queue: lqmem.LCQueue,
storage: lsmem.LCStorage,
runner: lrmem.LCRunner,
}
case "container":
// Assemble cccontainer
case "cluster":
@@ -75,12 +89,23 @@ func main() {
}
type CommanderParts struct {
commander MCCommander
logger MCLogger
queue MCQueue
storage MCStorage
runner MCRunner
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 {

View File

View File

View File

@@ -0,0 +1,4 @@
package mci
type MCCommander struct {
}

4
interfaces/mci/common.go Normal file
View File

@@ -0,0 +1,4 @@
package mci
type MCCommon struct {
}

4
interfaces/mci/logger.go Normal file
View File

@@ -0,0 +1,4 @@
package mci
type MCLogger struct {
}

4
interfaces/mci/queue.go Normal file
View File

@@ -0,0 +1,4 @@
package mci
type MCQueue struct {
}

4
interfaces/mci/runner.go Normal file
View File

@@ -0,0 +1,4 @@
package mci
type MCRunner struct {
}

View File

@@ -0,0 +1,4 @@
package mci
type MCStorage struct {
}

View File

View File

View File

View File

@@ -1,7 +1,7 @@
/*
Copyright © 2024 github
*/
package ccmem
package lcmem
import (
"log"
@@ -9,7 +9,6 @@ import (
"net/http"
"strconv"
"github.com/advanced-security/mrvacommander/lib/commander/lcmem"
"github.com/gorilla/mux"
"github.com/hohn/ghes-mirva-server/analyze"
co "github.com/hohn/ghes-mirva-server/common"

View File

@@ -0,0 +1 @@
package llmem

View File

View File

@@ -0,0 +1 @@
package lqmem

View File

View File

@@ -0,0 +1 @@
package lrmem

View File

@@ -0,0 +1 @@
package lsmem