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

Add examples

This commit is contained in:
Asim Aslam
2020-12-26 15:17:20 +00:00
parent 273bab5dd7
commit a34c70de0e
320 changed files with 20803 additions and 0 deletions

View File

@ -0,0 +1,43 @@
# 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
```shell
micro proxy
```
Run server
```shell
# serves Say.Hello
python rpc_server.py
```
Run client
```shell
# calls go.micro.srv.greeter Say.Hello
python rpc_client.py
```
## HTTP Example
Run proxy with proxy handler
```shell
micro proxy --handler=http
```
Run server
```shell
# serves /greeter
python http_server.py
```
Run client
```shell
# calls /greeter
python http_client.py
```