Skip to content

paStash NG Commands

Lorenzo Mangani edited this page Jan 26, 2019 · 11 revisions

paStash Commands

This WIP outlines the nature of paStash commands and their general usage.

What?

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)

Usage

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 {}
}
Clone this wiki locally