middleware

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recover

func Recover(logger logr.Logger) func(http.Handler) http.Handler

Recover from panics and logs the error.

func VersionHeader

func VersionHeader(name, version string) func(http.Handler) http.Handler

VersionHeader sets a version header on the response. If name is empty, it defaults to "X-Version".

func WriteTimeout

func WriteTimeout(timeout time.Duration) func(http.Handler) http.Handler

WriteTimeout sets the write deadline for writing the response. Use 0 to set an unlimited timeout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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