Transformer Pipeline Module API Reference
6.2.11.309924
|
Functions | |
system.scriptid () | |
Retrieve the id of the currently running pipeline script. More... | |
system.version () | |
Retrieve the version of the currently running pipeline module. More... | |
system.expand (var pattern) | |
Perform substitutions on a string. More... | |
system.threadindex (var pattern) | |
Return the current thread number. More... | |
system.get_pipeline (var scriptid) | |
Return configuration information for the specified pipeline. More... | |
system.delete_pipeline (var scriptid) | |
Delete the specified pipeline. More... | |
system.millitime () | |
Return the number of milliseconds since the Epoch. More... | |
system.time () | |
Return the number of seconds since the Epoch. More... | |
system.difftime (var time0, var time1) | |
Calculate time difference. More... | |
system.udpsignal_send (var msg) | |
Send a udpsignal. More... | |
system.set_status_down (var peer_label) | |
Set peer status down. More... | |
system.set_status_up (var peer_label) | |
Set peer status up. More... | |
system.peer_label_byindex (var index) | |
Return the peer label corresponding to a peer index. More... | |
system.peer_index_bylabel (var label) | |
Returns the peer index corresponding to a peer label. More... | |
system.peer_status_bylabel (var label) | |
Returns the peer status for a given peer label. More... | |
system.num_peers () | |
Return the number of configured peers in the system. More... | |
system.strptime (var timestamp, var format) | |
Parse a timestamp according the give timestamp format. More... | |
system.peer_enabled_bylabel (var label) | |
Returns whether a peer is enabled or not. More... | |
system.hostname () | |
Returns the hostname. More... | |
system.pipelines_for_symbol (var name) | |
Returns the pipeline id's for a given symbol. More... | |
system.get_log_level () | |
Get the current logging level for the pipeline log. More... | |
The functions in this package provide access to information about the system.
system.delete_pipeline | ( | var | scriptid | ) |
Delete the specified pipeline.
scriptid | - The scriptid of the pipeline which will be deleted |
0 | - Success |
nil | - Failure (pipeline does not exist) |
This function will delete the in-memory configuration of the specified pipeline. No more events will be passed into the pipeline and its configuration cannot be retrieved after this call.
system.difftime | ( | var | time0, |
var | time1 | ||
) |
Calculate time difference.
time0 | - First time |
time1 | - Second time |
system.expand | ( | var | pattern | ) |
Perform substitutions on a string.
pattern | - The string to perform substituions on |
This function will expand the following tokens in the supplied argument:
application-name
)application-name
)application-root
)system.get_log_level | ( | ) |
Get the current logging level for the pipeline log.
system.get_pipeline | ( | var | scriptid | ) |
Return configuration information for the specified pipeline.
scriptid | - The scriptid of the pipeline whose configuration should be returned |
This function will return an object of type Dynamic pipeline configuration that can be queried and set to adjust the configuration of the specified pipeline
system.hostname | ( | ) |
Returns the hostname.
system.millitime | ( | ) |
Return the number of milliseconds since the Epoch.
number | of milliseconds since the Epoch |
system.num_peers | ( | ) |
Return the number of configured peers in the system.
system.peer_enabled_bylabel | ( | var | label | ) |
Returns whether a peer is enabled or not.
label | - Peer label to return the state for |
0 | - Peer is disabled |
1 | - Peer is enabled |
system.peer_index_bylabel | ( | var | label | ) |
Returns the peer index corresponding to a peer label.
label | - Peer label to return the index for |
-1 | - Peer label not known |
system.peer_label_byindex | ( | var | index | ) |
Return the peer label corresponding to a peer index.
index | - Peer index to return the label for |
nil | - Peer index is not defined |
system.peer_status_bylabel | ( | var | label | ) |
Returns the peer status for a given peer label.
label | - Peer label to return the status for |
0 | - Peer is down |
1 | - Peer is up |
system.pipelines_for_symbol | ( | var | name | ) |
Returns the pipeline id's for a given symbol.
name | - Name of symbol |
nil | - No matching pipleines found |
system.scriptid | ( | ) |
Retrieve the id of the currently running pipeline script.
The id that is returned is that configured in add-pipeline configuration group
system.set_status_down | ( | var | peer_label | ) |
Set peer status down.
peer_label | - Label of peer to send status to - if not present then status sent to all peers |
0 | - Success |
-1 | - peer_label did not match any peers |
system.set_status_up | ( | var | peer_label | ) |
Set peer status up.
peer_label | - Label of peer to send status to - if not present then status sent to all peers |
0 | - Success |
-1 | - peer_label did not match any peers |
system.strptime | ( | var | timestamp, |
var | format | ||
) |
Parse a timestamp according the give timestamp format.
timestamp | - Time stamp to parse |
format | - The format to apply |
nil | - The timestamp could not be parsed |
The table has the following fields: year (four digits), month (1–12), day (1–31), hour (0–23), min (0–59), sec (0–61), wday (weekday, Sunday is 1), yday (day of the year), and isdst (daylight saving flag, a boolean).
To obtain a value in unix timestamp format the returned table can be supplied to the standard os.time() function, and then operations such as difftime may be applied.
Should format not be supplied, then the format defaults to: "%Y-%m-%dT%H:%M:%SZ" as per timers
system.threadindex | ( | var | pattern | ) |
Return the current thread number.
This function will return the current thread number (from 0 to num-threads - 1). It is primarily of use for testing purposes
system.time | ( | ) |
Return the number of seconds since the Epoch.
number | of seconds since the Epoch |
system.udpsignal_send | ( | var | msg | ) |
Send a udpsignal.
msg | - The message to send in the form "COMMAND ARG1 ARG2 ..." |
None | This function will send a UDP signal with the supplied message. The UDP command should be the first field of the message string. |
system.version | ( | ) |
Retrieve the version of the currently running pipeline module.
The version returned is in the form X.Y.Z where X is the major, Y the minor and Z the patch version.