Skip to content

Add graceful.ServeTLS()#5

Merged
milanmlft merged 7 commits into
mainfrom
milanmlft/add-serveTLS
Apr 10, 2026
Merged

Add graceful.ServeTLS()#5
milanmlft merged 7 commits into
mainfrom
milanmlft/add-serveTLS

Conversation

@milanmlft

Copy link
Copy Markdown
Contributor

Adds a graceful https handler

Checklist

  • Tests have been added

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds graceful HTTPS serving support to the pkg/graceful package, mirroring the existing signal-based graceful shutdown behavior used for HTTP servers.

Changes:

  • Refactors HTTP serving to reuse a new serveGracefully helper.
  • Adds graceful.ServeTLS() plus an internal listenAndServeTLS() wrapper.
  • Adds a new test validating log output for ServeTLS.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
pkg/graceful/serve.go Introduces ServeTLS and extracts common graceful-shutdown logic into serveGracefully.
pkg/graceful/serve_test.go Adds TLS test coverage for log output and generates an in-memory self-signed cert for the server.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/graceful/serve.go
Comment thread pkg/graceful/serve.go
Comment thread pkg/graceful/serve.go Outdated
Comment thread pkg/graceful/serve_test.go
Comment thread pkg/graceful/serve_test.go
Comment thread pkg/graceful/serve_test.go
milanmlft and others added 5 commits April 10, 2026 16:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@milanmlft milanmlft self-assigned this Apr 10, 2026

@t-young31 t-young31 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🚀

@milanmlft milanmlft merged commit b5ffbb8 into main Apr 10, 2026
2 checks passed
@milanmlft milanmlft deleted the milanmlft/add-serveTLS branch April 10, 2026 15:59
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