{"modulePath":"github.com/1995parham/cheshmhayash","version":"v1.4.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httpserver\n\nPackage httpserver runs an http.Server until its context ends and then shuts it down gracefully. The serve and mcp commands share it.\n\n## Functions\n\n```go\nfunc New(addr string, h http.Handler) *http.Server\n```\nNew returns an http.Server for addr and h with the timeouts every cheshmhayash listener uses.\n\n```go\nfunc Run(ctx context.Context, srv *http.Server, log *slog.Logger) error\n```\nRun serves srv until ctx ends or the listener fails. On ctx end it gives in-flight requests shutdownTimeout to complete. A listener failure is returned as an error.\n\n","path":"github.com/1995parham/cheshmhayash/internal/httpserver","name":"httpserver","synopsis":"Package httpserver runs an http.Server until its context ends and then shuts it down gracefully.","isRedistributable":true}
