Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context.Context to the Debug reporting method, and all serving/response handling. #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Apr 16, 2015

context.Context is useful for tracing, time limiting, and connecting to external systems. Further the use of it by adding to Debug and then all methods that lead to Debug.

This, as a by-product, results in the ability to provide a surrounding Context to Serve(); which previously insisted on Background, making it a better part of a surrounding application.

@tv42
Copy link
Member

tv42 commented Jun 6, 2016

BTW can you point at good examples of using an "app-scope" context that would be passed in to the top-level Serve? I'm curious but I have never seen an example in open source code that would actually improve anything. I'm extremely unsure what canceling such a context would even mean.

@ghost
Copy link
Author

ghost commented Jun 7, 2016

Don't have examples, and we have moved in a different direction - but our motivation was for an application that doesn't mount on startup, and may setup tracing or other variables in the Context for use later in the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant