google / nel-collector

Network Error Logging (NEL) collector
https://wicg.github.io/network-error-logging/
Apache License 2.0
39 stars 17 forks source link

Add per-request context parameter for each pipeline stage. #31

Closed cstahl1 closed 6 years ago

cstahl1 commented 6 years ago

A Context in go contains any relevant information that needs to be passed around for requests. When handling an HTTP request, any functions called from the handler should take a context parameter to preserve this information. In general, the context is extracted directly from the request, as implemented in DefaultContextGetter, but some use cases require more advanced logic, and thus Pipeline recieves a ContextGetter interface instead of just extracting the context directly.