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.
@jolynch: this branch implements something we had discussed a little while ago, namely a standalone or "oneshot" execution mode for Synapse. This is for situations where you would like to know what information is in Synapse's backing datastore, but you don't want to read it out of the datastore directly in order to preserve separation of concerns. By adding this standalone operation, we can use the same code paths that Synapse would use to read the data.
My initial use-case is monitoring scripts. I would like to deploy a container with the Synapse gem, and run it as a script that produces a list of backends as output. My monitoring script will process this output, check it for sanity, and report issues to my monitoring system if the results are insane.
This change makes use of a new method on watchers, that I've called
read
. As far as I can tell, right now watchers don't implement any method which provides the list of backends as output without mutating other state.read
is designed for that purpose.So far I've just touched the Zookeeper watcher. Please review for initial feasibility.
Example invocation: