You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For quick & dirty work, for instance when prototyping, it can be very useful to have a MsgFlo participant based on shell scripts, and mostly calling existing programs.
This can be done fairly simply in Python or Node.js, but one always needs to write some custom code, and this "host" wrapper code obscures the real meat; the commandline/script that is being run.
One could imagine a generic msgflo-script which would take on the commandline.
A shell script snippet
A string description of the component
Standard configuration like role/broker
It would then always expose an in port, and have outports out and error. The input message payload is provided as stdin. If the script (all commands in it) passes, the anything produced on stdout is send on out. Otherwise, stderr is sent on err.
Should probably also support a --file to take the script, so it can be used with MsgFlo component library, and have a handler for file on form myscript.sh.
For quick & dirty work, for instance when prototyping, it can be very useful to have a MsgFlo participant based on shell scripts, and mostly calling existing programs.
This can be done fairly simply in Python or Node.js, but one always needs to write some custom code, and this "host" wrapper code obscures the real meat; the commandline/script that is being run.
One could imagine a generic
msgflo-script
which would take on the commandline.It would then always expose an
in
port, and have outportsout
anderror
. The input message payload is provided as stdin. If the script (all commands in it) passes, the anything produced on stdout is send onout
. Otherwise, stderr is sent onerr
.If it is JSON input, script can for instance use
jq
to query https://stedolan.github.io/jq/ itThe text was updated successfully, but these errors were encountered: