feat: expose graceful drain state
This commit is contained in:
@@ -259,6 +259,9 @@ func run() error {
|
||||
return err
|
||||
case <-root.Done():
|
||||
readiness.BeginDrain()
|
||||
if metrics != nil {
|
||||
metrics.RecordDraining(true)
|
||||
}
|
||||
shutdown, cancel := context.WithTimeout(context.Background(), cfg.ShutdownTimeout)
|
||||
defer cancel()
|
||||
if err := server.Shutdown(shutdown); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user