1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-18 22:17:44 +02:00
Files
go-micro/examples/proxy/ruby/README.md

44 lines
542 B
Markdown
Raw Normal View History

2020-12-26 15:17:20 +00:00
# Ruby
- proxy.rb: methods to call proxy
- rpc_{client,server}.rb: RPC client/server
- http_{client,server}.rb: HTTP client/server
## RPC Example
Run proxy
```shell
micro proxy
```
Run server
```shell
# serves Say.Hello
ruby rpc_server.rb
```
Run client
```shell
# calls go.micro.srv.greeter Say.Hello
ruby rpc_client.rb
```
## HTTP Example
Run proxy with proxy handler
```shell
micro proxy --handler=http
```
Run server
```shell
# serves /greeter
ruby http_server.rb
```
Run client
```shell
# calls /greeter
ruby http_client.rb
```