-
Notifications
You must be signed in to change notification settings - Fork 68
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 support #72
Comments
@gwvandesteeg this is a good suggestion. The 1.7 driver is currently reworked to be pure Go (v1.8) which would make the implementation of context better (context can go a lot deeper into the internals). I'm not sure if we want to add an API for providing context on 1.8 driver but the underlying implementations will more or less use contexts. I'm putting this into the list of requested features for the 4.0 driver (version scheme now follows server versions). |
@2hdddg do you need help on this? |
@2hdddg Any plans for this? As I see it did not make it in the 4.x version |
Hi @2hdddg, i'm guessing there still is no support for context? |
Hello, current Go driver maintainer here (Peter moved to Kernel a year ago). |
Hey everyone, the experimental, pre-release 5.0.0-preview is out and includes these context-aware APIs. |
Add support on transactions and queries to use the standard context.Context objects to determine timeouts, deadlines, and cancellations for a request.
For example, expanding the
Session
type with aWhen building a microservice such as a REST API that needs to do a Cypher query, being able to pass in the received requests context to the query to handle cancellations and graceful shutdowns properly is really a must have to avoid leaving goroutines deadlocked in the background.
A sample use would be
The text was updated successfully, but these errors were encountered: