Open
Conversation
added 11 commits
May 2, 2015 01:44
…f the element via the json
cmd/circuit/procdkr.go
Outdated
Member
There was a problem hiding this comment.
"to do the entire circuit" should be "to execute on every host in the circuit"
Member
|
Let me know if any of the comments are unclear. |
Author
|
Good comments. I wanted your feedback on the timeout thing. I knew it was bad. |
added 5 commits
May 25, 2015 18:43
Author
|
I think I've got it all fixed up. |
|
I took this branch, merged current master back in, and fixed the resulting compile errors: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This was pretty easy to get going. It still has json on stdin, but it closes stdin, returns stdout, and scrubs the element. Is this a decent way to proceed? This already makes it much more shell friendly. This kind of thing looks nice:
https://gist.github.com/8c7864a67b24eac38ab8
Also I added a --all flag so it will go across the entire circuit. This example does a netstat and tags each line of output and does the entire circuit. The calls across the circuit go asyncronously.
cat netstat.in | circuit runproc --tag --all -d circuit://10.9.201.38:11022/9317/Q18f5f14751995021
The input json looks like this:
{
"Path": "/usr/bin/sudo",
"Args":["/bin/netstat", "-pant"],
"Name": "netstat"
}