Settings

Theme

Show HN: RSVP is a Go library for HTTP server graceful shutdown

github.com

3 points by jbarham 9 days ago · 0 comments · 1 min read

Reader

After then nth time copying and tweaking boilerplate Go code to enable HTTP graceful shutdown, I decided to package it up in to a library which I've called rsvp (i.e, "please respond").

Basic usage is to call rsvp.ListenAndServe which is a drop-in replacement for the standard library http.ListenAndServe function with graceful shutdown.

The default behavior can be customized with options to configure trigger signals, shutdown timeout and context, TLS and logging.

Full documentation with sample code is at https://pkg.go.dev/github.com/jbarham/rsvp#section-documenta....

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection