package timeout

import "golang.org/x/pkgsite/internal/middleware/timeout"

Index

Functions

func Timeout

func Timeout(d time.Duration) func(http.Handler) http.Handler

Timeout returns a new Middleware that times out each request after the given duration.

Source Files

timeout.go

Version
v0.0.0-20250704161611-eac0bf970406 (latest)
Published
Jul 4, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
1 month ago

Tools for package owners.