OnPreShutdown is a hook to execute user functions before Shutdown.
(handler ...OnPreShutdownHandler)
| 295 | |
| 296 | // OnPreShutdown is a hook to execute user functions before Shutdown. |
| 297 | func (h *Hooks) OnPreShutdown(handler ...OnPreShutdownHandler) { |
| 298 | h.app.mutex.Lock() |
| 299 | h.onPreShutdown = append(h.onPreShutdown, handler...) |
| 300 | h.app.mutex.Unlock() |
| 301 | } |
| 302 | |
| 303 | // OnPostShutdown is a hook to execute user functions after Shutdown. |
| 304 | func (h *Hooks) OnPostShutdown(handler ...OnPostShutdownHandler) { |