Shutdown gracefully shuts down the server
(ctx context.Context)
| 76 | |
| 77 | // Shutdown gracefully shuts down the server |
| 78 | func (s *Server) Shutdown(ctx context.Context) { |
| 79 | slog.Info("Shutting down the server...") |
| 80 | |
| 81 | ctx, closeServer := context.WithTimeout(ctx, s.router.config.GracefulStopTimeout) |
| 82 | defer closeServer() |
| 83 | |
| 84 | s.server.Shutdown(ctx) |
| 85 | } |
no outgoing calls