middleware

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 6 Imported by: 3

Documentation

Overview

Package middleware implements reusable HTTP middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRecovery

func WithRecovery(h http.Handler, log *logger.Logger) http.Handler

WithRecovery recovers from panics and log the error.

func WithStats

func WithStats(name string, s *statter.Statter, h http.Handler) http.Handler

WithStats collects statistics about HTTP requests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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