wip
This commit is contained in:
committed by
=Michael Hohn
parent
12b9bd9858
commit
9fc07e8c95
@@ -10,6 +10,12 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/BurntSushi/toml"
|
"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() {
|
func main() {
|
||||||
@@ -56,7 +62,15 @@ func main() {
|
|||||||
// Apply 'mode' flag
|
// Apply 'mode' flag
|
||||||
switch *mode {
|
switch *mode {
|
||||||
case "standalone":
|
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":
|
case "container":
|
||||||
// Assemble cccontainer
|
// Assemble cccontainer
|
||||||
case "cluster":
|
case "cluster":
|
||||||
@@ -75,12 +89,23 @@ func main() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommanderParts struct {
|
type MCCConf struct {
|
||||||
commander MCCommander
|
}
|
||||||
logger MCLogger
|
type MCLConf struct {
|
||||||
queue MCQueue
|
}
|
||||||
storage MCStorage
|
type MCQConf struct {
|
||||||
runner MCRunner
|
}
|
||||||
|
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 {
|
type MCConfig struct {
|
||||||
|
|||||||
4
interfaces/mci/commander.go
Normal file
4
interfaces/mci/commander.go
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package mci
|
||||||
|
|
||||||
|
type MCCommander struct {
|
||||||
|
}
|
||||||
4
interfaces/mci/common.go
Normal file
4
interfaces/mci/common.go
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package mci
|
||||||
|
|
||||||
|
type MCCommon struct {
|
||||||
|
}
|
||||||
4
interfaces/mci/logger.go
Normal file
4
interfaces/mci/logger.go
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package mci
|
||||||
|
|
||||||
|
type MCLogger struct {
|
||||||
|
}
|
||||||
4
interfaces/mci/queue.go
Normal file
4
interfaces/mci/queue.go
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package mci
|
||||||
|
|
||||||
|
type MCQueue struct {
|
||||||
|
}
|
||||||
4
interfaces/mci/runner.go
Normal file
4
interfaces/mci/runner.go
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package mci
|
||||||
|
|
||||||
|
type MCRunner struct {
|
||||||
|
}
|
||||||
4
interfaces/mci/storage.go
Normal file
4
interfaces/mci/storage.go
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package mci
|
||||||
|
|
||||||
|
type MCStorage struct {
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2024 github
|
Copyright © 2024 github
|
||||||
*/
|
*/
|
||||||
package ccmem
|
package lcmem
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
@@ -9,7 +9,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/advanced-security/mrvacommander/lib/commander/lcmem"
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"github.com/hohn/ghes-mirva-server/analyze"
|
"github.com/hohn/ghes-mirva-server/analyze"
|
||||||
co "github.com/hohn/ghes-mirva-server/common"
|
co "github.com/hohn/ghes-mirva-server/common"
|
||||||
|
|||||||
1
lib/logger/llmem/localdisk.go
Normal file
1
lib/logger/llmem/localdisk.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package llmem
|
||||||
1
lib/queue/lqmem/inmemory.go
Normal file
1
lib/queue/lqmem/inmemory.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package lqmem
|
||||||
1
lib/runner/lrmem/inmemory.go
Normal file
1
lib/runner/lrmem/inmemory.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package lrmem
|
||||||
1
lib/storage/lsmem/localdisk.go
Normal file
1
lib/storage/lsmem/localdisk.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package lsmem
|
||||||
Reference in New Issue
Block a user