Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServeResponse ¶
func ServeResponse( res http.ResponseWriter, req *http.Request, retriever types.RetrieverResponsePropertiesInterface, callback func(http.ResponseWriter, *http.Request, types.RetrieverResponsePropertiesInterface, RequestCoalescingInterface, func(http.ResponseWriter, *http.Request) error) error, rc RequestCoalescingInterface, nm func(w http.ResponseWriter, r *http.Request) error, )
ServeResponse serve the response
Types ¶
type RequestCoalescing ¶
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
Click to show internal directories.
Click to hide internal directories.