MCPcopy
hub / github.com/andeya/pholcus / GetDataCell

Function GetDataCell

app/pipeline/collector/data/data.go:37–45  ·  view source on GitHub ↗

GetDataCell returns a DataCell from the pool with the given fields.

(ruleName string, data map[string]interface{}, url string, parentURL string, downloadTime string)

Source from the content-addressed store, hash-verified

35
36// GetDataCell returns a DataCell from the pool with the given fields.
37func GetDataCell(ruleName string, data map[string]interface{}, url string, parentURL string, downloadTime string) DataCell {
38 cell := dataCellPool.Get().(DataCell)
39 cell[FieldRuleName] = ruleName
40 cell["Data"] = data
41 cell[FieldURL] = url
42 cell[FieldParentURL] = parentURL
43 cell[FieldDownloadTime] = downloadTime
44 return cell
45}
46
47// GetFileCell returns a FileCell from the pool with the given fields.
48func GetFileCell(ruleName, name string, bytes []byte) FileCell {

Calls 1

GetMethod · 0.65