wip: add analysis runner / agent, separate Server/Queue/Agent, use New* initializers
This commit is contained in:
committed by
=Michael Hohn
parent
2ab596bf1d
commit
f7155eba50
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user