coalescing

package
v1.6.42 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type RequestCoalescing

type RequestCoalescing struct {
	*stampede.Cache
}

RequestCoalescing handle the coalescing system

func Initialize

func Initialize() *RequestCoalescing

Initialize will return RequestCoalescing instance

func (*RequestCoalescing) Temporize

func (r *RequestCoalescing) Temporize(req *http.Request, rw http.ResponseWriter, nextMiddleware func(http.ResponseWriter, *http.Request) error)

Temporize will run one call to proxy then use the response for other requests that couldn't reach cached response

type RequestCoalescingInterface

type RequestCoalescingInterface interface {
	Temporize(*http.Request, http.ResponseWriter, func(http.ResponseWriter, *http.Request) error)
}

RequestCoalescingInterface is the interface

Jump to

Keyboard shortcuts

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