Return a server to run
Explicitly request a graceful shutdown of the service.
Explicitly request a graceful shutdown of the service.
There is no operational standard for this, but some common implementations include:
Return a task to shutdown the application.
Return a task to shutdown the application.
This task is run as a JVM shutdown hook, or when org.http4s.server.ServerApp.requestShutdown is explicitly called.
The default implementation shuts down the server, and waits for it to finish. Other resources may shutdown by flatMapping this task.
Starts a server and gracefully terminates at shutdown. The server is terminated and the shutdown task is run either by a JVM shutdown hook or an invocation of
requestShutdown()
.If the server fails to start, the
shutdown
task is not invoked. More robust resource management is possible throughProcessApp
orStreamApp
, which are introduced in http4s-0.16 and http4s-0.17, respectively.