Documentation
¶
Overview ¶
Package lifecycle owns the daemon shutdown sequence: once the reviewer finalizes the session, linger briefly so the browser can render the success state, then gracefully shut down the HTTP server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitFinalizeThenShutdown ¶
func WaitFinalizeThenShutdown(ctx context.Context, done <-chan struct{}, srv *http.Server, opts Options) error
WaitFinalizeThenShutdown blocks until `done` is closed, then lingers for opts.Linger, then gracefully shuts down srv with opts.ShutdownTimeout. If ctx is canceled first, the linger is skipped and the function returns ctx.Err() (after attempting a best-effort shutdown).
Types ¶
Click to show internal directories.
Click to hide internal directories.