The goal is to start getting useful traces out of tabletmanager.
To start, we trace outgoing RPC calls on the client side.
Certain high-level TopoServer operations are also traced at this point.
To facilitate tracing, I've begun plumbing Context through tabletmanager
and all its users. At this time, it is simply a few regexes adding the
parameter so it can be used by tracing; no timeouts or cancellation are
using Context yet. Those use cases will require more careful
consideration.
Other than tabletmanager, most callers use context.TODO() since they
aren't plumbed yet.
* * *
The context object is passed around.
* * *
the context is passed as interface{}
* * *
Bring back old function signatures.
* * *
Context-taking RPC method can declare their arguments using the real context type.
* * *
Use inteface{} for context in rpcplus.
The code was forked because the changes are minimal and seem right,
and because of the backward compatibility.
The protocal is backward compatible on the wire (old clients and servers
will still work with this new library, provided they don't use
the streaming RPC feature).
On the server side, a new interface type is recognized:
func (t *T) method(args T1, sendNonFinalReply func(reply interface{}) error, finalReply *T2) error
so the server implementation can send as many responses as it wants.
On the client side, the implementation uses a channel to read
the responses (and the for : range construct, most likely).