timeout

package module
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware added in v0.1.1

func Middleware(timeout time.Duration) func(next http.Handler) http.Handler

Middleware is a timeout middleware that cancels ctx after a given timeout.

  • Control timeout by yourself in the error handler.
  • If timeout <= 0, the middleware is a no-op.

Types

This section is empty.

Jump to

Keyboard shortcuts

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