pingora
pingora copied to clipboard
Add non-exiting methods and implement SIGHUP reload
Hey team! I've tried to make a few small tweaks to our server to hopefully improve its flexibility and add some reload functionality. Here's what's new:
- Added
pub fn try_bootstrap(&mut self) -> Result<bool>
that doesn't call exit - Refactored
pub fn bootstrap(&mut self)
to use the newtry_bootstrap
method - Added
pub fn run_server(mut self, enable_daemon: bool) -> Result<bool>
that doesn't call exit - Kept
pub fn run_forever(mut self) -> !
the same, but now it callsrun_server
under the hood - Implemented
SIGHUP
catching for reloading - Added an example server_reload to show how to reload within a tokio runtime
Related issues:
- #154
- #292