mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
This parallelize the Process() portion of the OPA processor. The main change is that called methods to evaluate a rule no longer mutate the internal state of the opaprocessor and allocate maps (less often, in larger chunks) that are merged at the end of the processing. Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
Kubescape core package
// initialize kubescape
ks := core.NewKubescape()
// scan cluster
results, err := ks.Scan(&cautils.ScanInfo{})
// convert scan results to json
jsonRes, err := results.ToJson()