Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
getty
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
getty
Commits
c8c1e4f1
Commit
c8c1e4f1
authored
Aug 19, 2018
by
AlexStocks
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mod: update readme to illustrate micro
parent
1e1f96d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
10 deletions
+50
-10
readme.md
readme.md
+50
-10
No files found.
readme.md
View file @
c8c1e4f1
...
...
@@ -18,11 +18,15 @@ The server sends back messages from client. The client sends messages to the ech
To run the example, start the server:
$ cd echo/tcp-echo/server/ && sh assembly/linux/test.sh && cd target/linux/echo_server-0.3.07-20161009-1632-test/ && sh bin/load.sh start
```
bash
$
cd echo
/tcp-echo/server/
&&
sh assembly/linux/test.sh
&&
cd
target/linux/echo_server-0.3.07-20161009-1632-test/
&&
sh bin/load.sh start
```
Next, start the client:
$ cd echo/tcp-echo/client/ && sh assembly/linux/test.sh && cd target/linux/echo_client-0.3.07-20161009-1634-test/ && sh bin/load.sh start
```
bash
$
cd echo
/tcp-echo/client/
&&
sh assembly/linux/test.sh
&&
cd
target/linux/echo_client-0.3.07-20161009-1634-test/
&&
sh bin/load.sh start
```
## getty example2: ws-echo ##
---
...
...
@@ -33,33 +37,69 @@ The server sends back messages from client. The client sends messages to the ech
To run the example, start the server:
$ cd echo/ws-echo/server/ && sh assembly/linux/test.sh && cd target/linux/echo_server-0.3.07-20161009-1632-test/ && sh bin/load.sh start
```
bash
$
cd echo
/ws-echo/server/
&&
sh assembly/linux/test.sh
&&
cd
target/linux/echo_server-0.3.07-20161009-1632-test/
&&
sh bin/load.sh start
```
Next, start the go client:
$ cd echo/ws-echo/client/ && sh assembly/linux/test.sh && cd target/linux/echo_client-0.3.07-20161009-1634-test/ && sh bin/load.sh start
```
bash
$
cd echo
/ws-echo/client/
&&
sh assembly/linux/test.sh
&&
cd
target/linux/echo_client-0.3.07-20161009-1634-test/
&&
sh bin/load.sh start
```
Or start the js client:
$ cd echo/ws-echo/js-client/ && open index.html in a internet browser(like chrome or ie or firefox etc).
```
bash
$
cd echo
/ws-echo/js-client/
&&
open index.html
in
a internet browser
(
like chrome or ie or firefox etc
)
.
```
## getty example3: rpc ##
---
This example shows
a simple
rpc client and server.
This example shows
how to build
rpc client and server.
The server sends back rpc response to client. The client sends rpc requests to the rpc server and prints all messages received.
To run the example on linux, start the server:
$ cd rpc/server/ && sh assembly/linux/test.sh && cd target/linux/rpc_server-0.9.2-20180806-1559-test/ && sh bin/load.sh start
```
bash
$
cd
rpc/server/
&&
sh assembly/linux/test.sh
&&
cd
target/linux/rpc_server-0.9.2-20180806-1559-test/
&&
sh bin/load.sh start
```
Next, start the go client:
$ cd rpc/client/ && sh assembly/linux/test.sh && cd target/linux/rpc_client-0.9.2-20180806-1559-test/ && sh bin/load.sh start
```
bash
$
cd
rpc/client/
&&
sh assembly/linux/test.sh
&&
cd
target/linux/rpc_client-0.9.2-20180806-1559-test/
&&
sh bin/load.sh start
```
What's more, if you run this example on mac, the server compile command should be:
$ cd rpc/server/ && sh assembly/mac/test.sh && cd target/darwin/rpc_server-0.9.2-20180806-1559-test/ && sh bin/load.sh start
$ cd rpc/client/ && sh assembly/mac/test.sh && cd target/darwin/rpc_client-0.9.2-20180806-1559-test/ && sh bin/load.sh start
```
bash
$
cd
rpc/server/
&&
sh assembly/mac/test.sh
&&
cd
target/darwin/rpc_server-0.9.2-20180806-1559-test/
&&
sh bin/load.sh start
$
cd
rpc/client/
&&
sh assembly/mac/test.sh
&&
cd
target/darwin/rpc_client-0.9.2-20180806-1559-test/
&&
sh bin/load.sh start
```
## getty example4: micro ##
---
This example shows how to build micro client and server to do service registration and service discovery based on rpc.
To run the example on linux, start the server:
```
bash
$
cd
micro/server/
&&
sh assembly/linux/test.sh
&&
cd
target/linux/micro_server-0.9.2-20180806-1559-test/
&&
sh bin/load.sh start
```
Next, start the go client:
```
bash
$
cd
micro/client/
&&
sh assembly/linux/test.sh
&&
cd
target/linux/micro_client-0.9.2-20180806-1559-test/
&&
sh bin/load.sh start
```
What's more, if you run this example on mac, the server compile command should be:
```
bash
$
cd
micro/server/
&&
sh assembly/mac/test.sh
&&
cd
target/darwin/micro_server-0.9.2-20180806-1559-test/
&&
sh bin/load.sh start
$
cd
micro/client/
&&
sh assembly/mac/test.sh
&&
cd
target/darwin/micro_client-0.9.2-20180806-1559-test/
&&
sh bin/load.sh start
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment