singleflight_middleware

package
v0.0.0-...-621706c Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SingleFlight

func SingleFlight(log logger.Logger, options ...Option) func(next http.Handler) http.Handler

SingleFlight is a middleware that prevents duplicate requests from hitting your server.

Types

type Option

type Option func(*singleFlight)

func WithKeyFn

func WithKeyFn(keyFn func(r *http.Request) string) Option

Jump to

Keyboard shortcuts

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