miniplumber: Modified existing pipe API and added "pipe truncate" to API. #1334
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The changes to the existing API are as follows (previous -> new):
The changes are meant to make some existing commands more intuitive. As a contrived example, previously, "pipe foo mode" -- which may not sound like a valid command -- would send a message "mode" to the pipe minimega//foo, while "pipe foo mode round-robin" would change the mode of minimega//foo to round-robin delivery. ("pipe foo 'mode round-robin'", meanwhile, would send a message "mode round-robin" to minimega//foo but leave the delivery mode unaltered.)
Additionally, the ability to truncate long messages in output to "pipe" has been introduced:
...where is in number of characters to be printed.
Usage examples (previous -> new):
Documentation via minimega's "help" command has been updated to reflect these changes.