Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Server customize shutdown and signals to support embedding #493

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kriswuollett
Copy link

@kriswuollett kriswuollett commented Dec 13, 2024

This change currently aims to minimize the code diff. Still need to test for my use case.

Fixes #492

@kriswuollett kriswuollett marked this pull request as draft December 13, 2024 17:07
@kriswuollett kriswuollett force-pushed the signal-handling-fn branch 2 times, most recently from 0ae925f to 6773af5 Compare December 13, 2024 17:34
…ior.

This change supports building a server that can run Pingora without it
calling std::process::exit during shutdown.
@kriswuollett kriswuollett marked this pull request as ready for review December 13, 2024 18:01
@drcaramelsyrup drcaramelsyrup self-requested a review December 20, 2024 17:26
GracefulTerminate,
FastShutdown,
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add doc comments for these public types.

@@ -306,14 +362,25 @@ impl Server {
}
}

/// Start the server using [Self::run] and default [RunArgs].
#[allow(unused_mut)] // TODO: May not need to keep mut self in interface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the mut.

@andrewhavck andrewhavck self-assigned this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support running Server without std::process::exit
2 participants