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-20250218150137-224a1368cf02 (latest)
Published
Feb 18, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
2 months ago

Tools for package owners.