spacewander commented on issue #34:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/34#issuecomment-1034391781


   Thanks for your design.
   My original thought is simpler: we can add a method in the Request to return 
a Context. It works like the one from the standard library: 
https://pkg.go.dev/net/http#Request.Context.
   
   People can fetch it only when they need the Context. And the timeout of 
Context is slightly smaller than 60s so people can still break the execution 
with a custom response before the actual timeout.
   
   There is a tricky place: the timeout of Nginx is per-operation, so when we 
communicate with Nginx again in 
https://github.com/apache/apisix-go-plugin-runner/blob/6bb1c4bd98ec374638af7ed02931e0efb2604044/internal/http/request.go#L326
   the timer will be reset. Maybe we can handle this in a separate PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to