You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pingora server code assumes it won't be wrapped by something else since the only entry point Server::run_forever which calls std::process::exit(0).
Solution
Refactor Server so that an additional run function can be called that returns with Result instead of exiting the process. It would be up to the caller to support daemonization or not. I'd assume the daemonization and shutdown signal generation code could be refactored out so that a pingora wrapper could use them as needed.
Basically, would be nice to see code similar to how axum can be run:
Problem
Pingora server code assumes it won't be wrapped by something else since the only entry point
Server::run_forever
which callsstd::process::exit(0)
.Solution
Refactor
Server
so that an additional run function can be called that returns withResult
instead of exiting the process. It would be up to the caller to support daemonization or not. I'd assume the daemonization and shutdown signal generation code could be refactored out so that a pingora wrapper could use them as needed.Basically, would be nice to see code similar to how
axum
can be run:Alternatives
Additional context
Planning to supporting features like #374 may influence the overall design.
The text was updated successfully, but these errors were encountered: