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
@@ -27,6 +27,11 @@ type StorageSingle struct {
|
||||
CurrentID int
|
||||
}
|
||||
|
||||
func NewStorageSingle(startingID int) *StorageSingle {
|
||||
s := StorageSingle{CurrentID: startingID}
|
||||
return &s
|
||||
}
|
||||
|
||||
func (s *StorageSingle) NextID() int {
|
||||
s.CurrentID += 1
|
||||
return s.CurrentID
|
||||
@@ -121,6 +126,12 @@ func GetResult(js common.JobSpec) common.AnalyzeResult {
|
||||
return ar
|
||||
}
|
||||
|
||||
func SetResult(sessionid int, orl common.OwnerRepo, ar common.AnalyzeResult) {
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
result[common.JobSpec{ID: sessionid, OwnerRepo: orl}] = ar
|
||||
}
|
||||
|
||||
func PackageResults(ar common.AnalyzeResult, owre common.OwnerRepo, vaid int) (zipPath string, e error) {
|
||||
slog.Debug("Readying zip file with .sarif/.bqrs", "analyze-result", ar)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user