Skip to content

Instantly share code, notes, and snippets.

@andresilva
Created December 7, 2016 12:17
Show Gist options
  • Save andresilva/c625da17e688662809fde675ced89ac1 to your computer and use it in GitHub Desktop.
Save andresilva/c625da17e688662809fde675ced89ac1 to your computer and use it in GitHub Desktop.
spray dynamic route
def receive = {
case EnableMaster(f) => enableMaster(f)
case EnableProxy(h, p, f) => enableProxy(Some((h, p, f)))
case ForecasterClusterSingleton.Started(h, p, f) if h != selfHost || p != selfHttpPort =>
self ! EnableProxy(h, p, f)
case m => currentService.foreach(_.forward(m))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment