Releases: porthos-rpc/porthos-go
Releases · porthos-rpc/porthos-go
Huge Refactor
- Client and server are now in the
porthos
(top level) package. - Server now has a blocking
ListenAndServe
function. - Server now has
Close
(async shutdown) andShutdown
(blocking shutdown). - Server now has
RegisterWithSpec
function to provide a spec alongside with the handler function. - Added a built-in extension to ship (to the playground app) all registered procedures with specs.
- Status code constants were renamed after moved to the top level package (
porthos
).
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.
First official release
Since @eventials started using porthos-go, we feel good enough to announce the first release. \o/