httpserver

package
v0.27.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Overview

Package httpserver runs an *http.Server bound to a context, with a bounded graceful shutdown and a force-close fallback so CTRL+C always returns the prompt — even when long-lived handlers (SSE, streaming proxies) ignore request-context cancellation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, srv *http.Server, graceTimeout time.Duration) error

Run blocks until ctx is cancelled or the server errors. On cancellation it attempts a graceful Shutdown bounded by graceTimeout; if that times out it calls srv.Close to force-terminate remaining connections.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL