mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
.. | ||
Gemfile | ||
http_client.rb | ||
http_server.rb | ||
proxy.rb | ||
README.md | ||
rpc_client.rb | ||
rpc_server.rb |
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
micro proxy
Run server
# serves Say.Hello
ruby rpc_server.rb
Run client
# calls go.micro.srv.greeter Say.Hello
ruby rpc_client.rb
HTTP Example
Run proxy with proxy handler
micro proxy --handler=http
Run server
# serves /greeter
ruby http_server.rb
Run client
# calls /greeter
ruby http_client.rb