1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-23 17:53:05 +02: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

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