Open peterwillis opened 2 years ago
Nice change :)
I worked on this change a year ago but I didn't complete it, it was implemented in the exact same way for retro compatibility so I agree with your implementation (I just shortened XXXContext to XXXCtx for shorter names).
I drop some notes I took here:
There is no big deal with these points and overall Go developers use context, I think it's a good change for Goca.
Description Go client accepts a context and uses it when executing any XML-RPC request.
Use case It is important when using Go to consider context when performing actions. This allows for timeouts and other reasons for cancellations to be controlled by the user of the client. A good example is if the connection to the open nebula api is not temporarily unavailable. In the current implementation a request will just hang. I need this to make code that uses the open nebula api more reliable.
Interface Changes The Go client will have an additional set of methods in the same way that
database/sql
does in the standard library. This completely preserves backward compatibility.Progress Status