canonical / go-dqlite

Go bindings for libdqlite
https://dqlite.io
Apache License 2.0
425 stars 68 forks source link

feat(connector): honor context cancelation #315

Open letFunny opened 3 weeks ago

letFunny commented 3 weeks ago

Honor context cancelation and primitive version of error reporting. We need to revamp the error handling and reporting for us to be able to provide better ones, until then we will follow the convention in the code.

As part of this PR, I did some changes to the *Message functions to make them public to properly test the code. Ideally they will live in their own package with proper encapsulation but that can come at a later PR.

cole-miller commented 3 weeks ago

It looks like context.AfterFunc was added only in Go 1.21 and we're testing with Go as far back as 1.13. Is it possible to shim this somehow?