youtube/vitess — pull request #151 by enisoc (2014-11-11 21:06:43+00:00)
Title: Convert Unused(Request|Response) from string to struct{}.

@sougou

The use of string as the Unused type prevented methods from adding new
optional args or replies that were previously Unused, in a
backwards-compatible way. The BSON library will return errors and the
RPC layer will refuse to invoke the method on the server.

Changing the Unused type to struct{} will allow Unused args or replies
to be later changed to real, non-empty structs without breaking
compatibility during the transition. However, this must be done in two
steps:

1) Change Unused from string to struct{} (this commit). During this
transition, servers and clients can talk to each other regardless of
whether they've been updated yet. However, you can't yet add new
optional args or replies that were previously Unused, as explained in
unused_test.go.

2) After all deployed servers and clients have been updated at least
past step 1 (this commit), it will be safe to replace Unused with
real structs at any time.