View how-to-dag-1.1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"emails":{ | |
"gmailEmails":{ | |
"filter":{ | |
"conditions":[{ | |
"date": "between now and 1 week before now" | |
}] | |
}, | |
"wants": [ | |
"archive", | |
"headers", |
View how-to-dag-1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"emails":{ | |
"gmailEmails":{ | |
"filter":{ | |
"conditions":[{ | |
"date": "between now and 1 week before now" | |
}] | |
}, | |
"wants": [ | |
"archive", | |
"headers", |
View mini-elastic-dag.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"dag": { | |
"inputs":{ | |
"rpc":{ | |
"search":{ | |
"methods": ["GET"], | |
"path": "/_search", | |
"CORS":{} | |
} | |
} | |
}, |
View mini-elastic-search.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func Compute(req sandboxrpc.ComputeRequest) ([]sandboxrpc.ComputeResponse, error) { | |
inData := req.In.Data | |
if len(inData) != 1 { | |
return nil, fmt.Errorf("empty input") | |
} | |
var resp []sandboxrpc.ComputeResponse | |
v := inData[0] | |
idx, err := utils.OpenIndex(true) | |
if err != nil { |
View mini-elastic-load.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func Compute(req sandboxrpc.ComputeRequest) ([]sandboxrpc.ComputeResponse, error) { | |
idx, err := utils.OpenIndex(false) | |
if err != nil { | |
return nil, errors.New("Something went wrong while creating the index: " + err.Error()) | |
} | |
defer idx.Close() | |
datums, err := fetchMajesticCSV() | |
if err != nil { | |
return nil, err |
View rpc-simple.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const newResponse = (status_code, header, body) => { | |
return { status_code, header, | |
body: Buffer.from(JSON.stringify(body) || '').toString('base64') | |
} | |
} | |
module.exports = function (got) { | |
const inData = got.in.data; | |
console.log('edig: simple.js: data received:', inData); |
View rpc-edig-simple.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dns = require('dns'); | |
const pify = require('pify'); | |
//... | |
module.exports = function (got) { | |
const inData = got.in.data; | |
console.log('edig: simple.js: data received:', inData); | |
return inData.map(d => { |
View rpc-edig-dag-extract.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"dag": { | |
"inputs":{ | |
"rpc":{ | |
"simple_rpc":{ | |
"methods": ["GET"], | |
"path": "/edig/txt/*", | |
"CORS":{} | |
} | |
} | |
}, |
View rpc-dag-extract.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dag": { | |
"inputs": { | |
"rpc": { | |
"simple_rpc": { | |
"methods": ["GET"], | |
"path": "/simple", | |
"CORS": {} | |
} | |
} |
View how-to-node1-2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let textUtils = require('@redsift/text-utilities'); | |
module.exports = function (got) { | |
// got.in contains the key/value pairs that match the given query | |
const inData = got.in; | |
console.log('counter: node1.js: running...', inData.data); | |
const json = inData.data.map(d => JSON.parse(d.value)); |
NewerOlder