In some cases you may want your server to drop all HTTP connection kept alive. A Restart function call may call Shutdown and ListenAndServe of http.Server, without RESTful Server's ListenAndServe returning.
That is likely to cause a bit of downtime. But may come handy when your server is not ready to handle requests. Such as when you make K8s readiness probe fail.
In some cases you may want your server to drop all HTTP connection kept alive. A
Restart
function call may callShutdown
andListenAndServe
ofhttp.Server
, without RESTfulServer
'sListenAndServe
returning.That is likely to cause a bit of downtime. But may come handy when your server is not ready to handle requests. Such as when you make K8s readiness probe fail.