1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-24 10:07:04 +02:00
go-micro/examples/proxy/python
2020-12-26 15:17:20 +00:00
..
http_client.py Add examples 2020-12-26 15:17:20 +00:00
http_server.py Add examples 2020-12-26 15:17:20 +00:00
proxy.py Add examples 2020-12-26 15:17:20 +00:00
README.md Add examples 2020-12-26 15:17:20 +00:00
rpc_client.py Add examples 2020-12-26 15:17:20 +00:00
rpc_server.py Add examples 2020-12-26 15:17:20 +00:00

Python

  • proxy.py: methods to call proxy
  • rpc_{client,server}.py: RPC client/server
  • http_{client,server}.py: HTTP client/server

RPC Example

Run proxy

micro proxy

Run server

# serves Say.Hello
python rpc_server.py

Run client

# calls go.micro.srv.greeter Say.Hello
python rpc_client.py

HTTP Example

Run proxy with proxy handler

micro proxy --handler=http

Run server

# serves /greeter
python http_server.py

Run client

# calls /greeter
python http_client.py