-
-
Notifications
You must be signed in to change notification settings - Fork 28
paStash NG Commands
Lorenzo Mangani edited this page Jan 26, 2019
·
11 revisions
This WIP outlines the nature of paStash commands and their general usage.
Commands are pluggable pipeline functions users can inject in their logic using npm modules. Example:
.filter('method', 'INVITE')
.groupBy('response')
.divide('timestamp',1000,data)
.data(data)
In order to understand the potential usage we'll create a simple pipeline applying multiple cascading actions to an array of objects.
input {
stdin{}
}
filter {
json_fields {}
command {
debug => false
cmd => ".divide('age',2,data).multiply('eyes',2,data).data(data)"
plugins => ['@pastash/command_chain','@pastash/command_math']
}
}
output {
stdout {}
}