Skip to content

Instantly share code, notes, and snippets.

@jchapuis
Created May 10, 2020 20:06
Show Gist options
  • Save jchapuis/ac11a746a9005d1f35119449ac66d14b to your computer and use it in GitHub Desktop.
Save jchapuis/ac11a746a9005d1f35119449ac66d14b to your computer and use it in GitHub Desktop.
Markdium-Orchestrating startup and shutdown in Scala
val akkaApplicationService: Service = builder
.startSystemDependent(SomeEtcdService())
.thenStartHttp(
HttpServiceDefinition(
new AkkaControllers().routes,
serverConfig.host,
serverConfig.port,
serverConfig.hardDeadline,
serverConfig.unbindingDelay
)
)
.thenStartClusterDependent(SomeEntityService())
.thenStartClusterDependent(SomeKafkaConsumerService())
.complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment