You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are making concurrent requests with the Gerrit API client in x/build/gerrit, it would be nice to be able to coordinate cancelation if the request is no longer necessary.
There's some preliminary discussion about migrating a client library here, on the go-github project: google/go-github#526
Some options, none of which I am very happy about:
Change the API.
Adding XContext(ctx, args...) methods on the existing Client for every X method, e.g. AbandonChangeContext, CreateProjectContext, etc.
Add a ContextClient that has a Context property on the Client struct, and give up on reusing that client across requests.
Add a ContextClient that has the same methods, but with a Context parameter as the first argument, so you'd choose which client you want based on whether you want contexts or not.
Copy to x/build/gerrit2, x/build/gerritctx or similar with a renamed set of API's.
Do nothing.
The text was updated successfully, but these errors were encountered:
Copy to x/build/gerrit2, x/build/gerritctx or similar with a renamed set of API's.
In theory, with some amount of work, such a package can be automatically generated by source code rewriting of the original package. Then it can be easily kept in sync, it'd be just go generate. But I think it's a bad idea to have 2 packages permanently, if there's no long term plan to eventually join them (which would require breaking APIs).
If you are making concurrent requests with the Gerrit API client in x/build/gerrit, it would be nice to be able to coordinate cancelation if the request is no longer necessary.
For example, https://go-review.googlesource.com/#/c/35551/ would fetch Github issues and Gerrit CL's in parallel; it would be nice to cancel one if the other fails.
There's some preliminary discussion about migrating a client library here, on the go-github project: google/go-github#526
Some options, none of which I am very happy about:
The text was updated successfully, but these errors were encountered: