Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miniplumber: Modified existing pipe API and added "pipe truncate" to API. #1334

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mpopple
Copy link
Contributor

@mpopple mpopple commented Jul 1, 2019

The changes to the existing API are as follows (previous -> new):

"pipe <pipe> <mode,> <all,round-robin,random>" -> "pipe name <pipe> <mode,> <all,round-robin,random>"
"pipe <pipe> <log,> <true,false>" -> "pipe name <pipe> <log,> <true,false>"
"pipe <pipe> <data>" -> "pipe send <pipe> <data>"
"pipe <pipe> <via,> <command>..." -> "pipe send <pipe> <via,> <command>..."

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:

"pipe <truncate,> <length>"

...where is in number of characters to be printed.

Usage examples (previous -> new):

pipe foo "a message" -> pipe send foo "a message"
pipe foo mode round-robin -> pipe name foo mode round-robin
pipe truncate 32

Documentation via minimega's "help" command has been updated to reflect these changes.

miniplumber: Modified existing pipe API and added "pipe truncate" to API.

The changes to the existing API are as follows (previous -> new):

	"pipe <pipe> <mode,> <all,round-robin,random>" -> "pipe name <pipe> <mode,> <all,round-robin,random>"
	"pipe <pipe> <log,> <true,false>" -> "pipe name <pipe> <log,> <true,false>"
	"pipe <pipe> <data>" -> "pipe send <pipe> <data>"
	"pipe <pipe> <via,> <command>..." -> "pipe send <pipe> <via,> <command>..."

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:

	"pipe <truncate,> <length>"

...where <length> is in number of characters to be printed.

Usage examples (previous -> new):

	pipe foo "a message" -> pipe send foo "a message"
	pipe foo mode round-robin -> pipe name foo mode round-robin
	pipe truncate 32

Documentation via minimega's "help" command has been updated to reflect these changes.
@aherna aherna added this to the 2.7 milestone Sep 11, 2020
@csymonds csymonds modified the milestones: 2.7, 2.7.1 Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants