Example #1
0
func peformIngest(jsonData []byte) ([]echoprint.IngestResult, error) {
	codegenList, err := echoprint.ParseCodegen(jsonData)
	if err != nil {
		return nil, err
	}

	results := echoprint.IngestAll(codegenList)

	debug.FreeOSMemory()
	return results, nil
}
Example #2
0
func peformQuery(jsonData []byte) ([]queryResult, error) {
	codegenList, err := echoprint.ParseCodegen(jsonData)
	if err != nil {
		return nil, err
	}

	matchGroups := echoprint.MatchAll(codegenList)
	result := make([]queryResult, len(matchGroups))
	for i, group := range matchGroups {
		result[i] = newQueryResult(group)
	}

	debug.FreeOSMemory()
	return result, nil
}