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

feat: use context.Context #855

Closed
wants to merge 4 commits into from
Closed

Conversation

garrettladley
Copy link
Member

No description provided.

@garrettladley garrettladley linked an issue May 20, 2024 that may be closed by this pull request
@DOOduneye
Copy link
Contributor

Im just curious the purpose? What does context add

@garrettladley
Copy link
Member Author

Im just curious the purpose? What does context add

allows for request timeouts & deadlines and passing of request specific values. for example, we can have use a context to cancel a call to another service after 200ms, or cancel a long running database query after 500ms. very configurable and seen as idiomatic in go services

@garrettladley
Copy link
Member Author

helper func to check if timeout exceeded

@garrettladley
Copy link
Member Author

will do this iteratively instead of all at once

@garrettladley garrettladley deleted the 850-feat-use-contextcontext branch June 6, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📝 feat: use context.Context
2 participants