Add save and load route table feature to nats-client #295
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.
routing_utils
The main purpose of this functionality is to be able to easily load scenarios where the route table is in a specific state.
This is helpful in debugging problems like the ones mentioned here and here or here
Developers can simply craft a route table as desired instead of having to tweak apps and NATS to behave in such a way that the issue is reproduced.
gorouter.yml
config file for the nats-client to read. If you started gorouter without a config file, you may use this one:router.register
NATS messages.routes.json
file with a pretty-printed output of the/routes
endpoint of gorouter. It could look like this:routes.json
file, e.g. add another route or change an existing one, add more endpoints etc. Be aware that this only works well with TLS routes as non-TLS routes will be pruned shortly after.cf-app.cf.my.domain.com
:nats-client can save and restore gorouter route tables using NATS.
nats-client can only publish and subscribe to NATS.
Links to any other associated PRs
I have viewed signed and have submitted the Contributor License Agreement
I have made this pull request to the
develop
branchI have run all the unit tests using
scripts/run-unit-tests-in-docker
(Optional) I have run Routing Acceptance Tests and Routing Smoke Tests on bosh lite
(Optional) I have run CF Acceptance Tests on bosh lite