juju/juju — pull request #75 by jameinel (2014-06-11 10:01:09+00:00)
Title: Allow Version headers in RPC requests

This adds the Version field to the RPC code, and updates the RPC server so that it can either Serve a normal object that has methods taking an id string, or it can ServeFinder which allows you to write your own lookup mechanism.

This is roughly the same code as the previous work here: https://code.launchpad.net/~jameinel/juju-core/api-rpc-reflect-version/+merge/219653 only it doesn't change the MethodCaller interface as much. Instead of looking up a concrete object and then inspecting that object for its type and methods, it assumes you have access to the ObjType without creating one. (Which is where the follow on code evolved to, so I know it is safe to do so.)