Skip to content

New arguments API

Compare
Choose a tag to compare
@gfronza gfronza released this 15 Feb 11:58
· 78 commits to master since this release

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.