Skip to content

Instantly share code, notes, and snippets.

@mbarton
Created August 22, 2014 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbarton/29f0933d93f0a35ccb8d to your computer and use it in GitHub Desktop.
Save mbarton/29f0933d93f0a35ccb8d to your computer and use it in GitHub Desktop.
Cluster -> Client Reverse Connection
log.info("Starting single node connected to two gateways")
val baseConfig = raw(
"""
machines {
machine {}
}
gateways {
gatewayA {}
gatewayB {}
}
nodes {
proto {
seed-nodes: ["nodeA"]
version: "2.0-SNAPSHOT"
}
nodeA {}
}
""")
doApply(baseConfig)
log.info("Press enter to switch to two nodes")
readLine()
val twoNodeConfig = baseConfig
.withValue("nodes.nodeB", empty.root)
doApply(twoNodeConfig)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment