From efdf84dde3389820ebbffab9f385112e219665fd Mon Sep 17 00:00:00 2001 From: AntonYPost Date: Fri, 24 May 2024 20:33:03 +0300 Subject: [PATCH 1/2] add NewResultsHash --- onpremise/onpremise.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/onpremise/onpremise.go b/onpremise/onpremise.go index f7e989d..8aee8dd 100644 --- a/onpremise/onpremise.go +++ b/onpremise/onpremise.go @@ -260,7 +260,7 @@ func WithRandomization(seconds int) EngineOptions { } // WithProperties sets properties that the engine retrieves from the data file for each device detection result instance -// default is "" which will include all possible properties +// default is [] which will include all possible properties func WithProperties(properties []string) EngineOptions { return func(cfg *Engine) error { if properties != nil { @@ -377,6 +377,11 @@ func mapEvidence(evidenceList []Evidence) (*dd.Evidence, error) { return evidenceHash, nil } +// Create a new raw ResultsHash object. +func (e *Engine) NewResultsHash(capacity uint32, overridesCapacity uint32) *dd.ResultsHash { + return dd.NewResultsHash(e.manager, capacity, overridesCapacity) +} + // Stop has to be called to free all the resources of the engine // before the instance goes out of scope func (e *Engine) Stop() { From 0df4a7a37ba2269a41d0668a045c31dbcd3ed9b1 Mon Sep 17 00:00:00 2001 From: AntonYPost Date: Thu, 20 Jun 2024 13:07:53 +0300 Subject: [PATCH 2/2] Rename NewResultsHash capacity --- onpremise/onpremise.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/onpremise/onpremise.go b/onpremise/onpremise.go index 8aee8dd..9e2e450 100644 --- a/onpremise/onpremise.go +++ b/onpremise/onpremise.go @@ -378,8 +378,8 @@ func mapEvidence(evidenceList []Evidence) (*dd.Evidence, error) { } // Create a new raw ResultsHash object. -func (e *Engine) NewResultsHash(capacity uint32, overridesCapacity uint32) *dd.ResultsHash { - return dd.NewResultsHash(e.manager, capacity, overridesCapacity) +func (e *Engine) NewResultsHash(evidenceCapacity uint32, overridesCapacity uint32) *dd.ResultsHash { + return dd.NewResultsHash(e.manager, evidenceCapacity, overridesCapacity) } // Stop has to be called to free all the resources of the engine