Skip to content

feat(go): Add shutdown handler - #9

Merged
jedevc merged 2 commits into
prod-stagingfrom
nderjung/feat/go/shutdown-handler
Sep 11, 2026
Merged

jedevc merged 2 commits into
prod-stagingfrom
nderjung/feat/go/shutdown-handler

Conversation

@nderjung

@nderjung nderjung commented Sep 9, 2026

Copy link
Copy Markdown
Member

No description provided.

Plugin.Shutdown, and WithShutdown for Serve, run after the server has
drained and before Main returns, on the remainder of ShutdownTimeout.
Until now a plugin had no safe place for its own teardown: a goroutine
watching the base context raced the process exit and usually lost.

Signed-off-by: Alexander Jung <alex@unikraft.com>
Signed-off-by: Alexander Jung <alex@unikraft.com>
@nderjung
nderjung requested a review from jedevc September 9, 2026 17:19

@jedevc jedevc 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.

Reviewed-by: Justin Chadwell <justin@unikraft.com>
Approved-by: Justin Chadwell <justin@unikraft.com>

@jedevc
jedevc merged commit 8c7dd28 into prod-staging Sep 11, 2026
7 checks passed
@jedevc
jedevc deleted the nderjung/feat/go/shutdown-handler branch September 11, 2026 14:53
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.

2 participants