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

server: add serve and serve_with_graceful_shutdown helpers #1382

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

niklasad1
Copy link
Member

No description provided.

@niklasad1 niklasad1 requested a review from a team as a code owner May 29, 2024 14:06
@@ -79,6 +83,60 @@ where
}
}

/// Serve a service over a TCP connection.
pub async fn serve<S, B, I>(io: I, service: S) -> Result<(), BoxError>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I would mention here that graceful shutdowns are not handled, and users should look at serve_with_graceful_shutdown in those cases or similar

Copy link
Contributor

@lexnv lexnv left a comment

Choose a reason for hiding this comment

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

LGMT!

Copy link
Collaborator

@jsdw jsdw left a comment

Choose a reason for hiding this comment

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

LGTM, nice to see some examples get simpler and less overall code!

@niklasad1 niklasad1 merged commit 8433f48 into master Jun 6, 2024
11 checks passed
@niklasad1 niklasad1 deleted the na-add-helpers-for-low-level-api branch June 6, 2024 10:25
@niklasad1 niklasad1 mentioned this pull request Jun 6, 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.

4 participants