New arguments API
Now the Client exposes a little DSL to make RPC calls:
// async call
responseChan, err := serviceClient.Call("addOne").WithArgs(10).Async()
// sync call
response, err := serviceClient.Call("addOne").WithArgs(10).WithTimeout(2 * time.Second).Sync()
// call void
serviceClient.Call("doSomething").WithBody(bytes).Void()
The method name now is being transported in a custom Header (X-Method
) and the request body goes into AMQP message body directly.