wip: add analysis runner / agent, separate Server/Queue/Agent, use New* initializers

This commit is contained in:
Michael Hohn
2024-05-23 15:46:55 -07:00
committed by =Michael Hohn
parent 2ab596bf1d
commit f7155eba50
10 changed files with 209 additions and 22 deletions

View File

@@ -1,4 +1,17 @@
package queue
import "mrvacommander/pkg/common"
type QueueSingle struct {
NumWorkers int
jobs chan common.AnalyzeJob
results chan common.AnalyzeResult
}
func NewQueueSingle(numWorkers int) *QueueSingle {
q := QueueSingle{}
q.jobs = make(chan common.AnalyzeJob, 10)
q.results = make(chan common.AnalyzeResult, 10)
q.NumWorkers = numWorkers
return &q
}