Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
5d3cb77c
Commit
5d3cb77c
authored
5 years ago
by
fangyincheng
Browse files
Options
Downloads
Patches
Plain Diff
Mod: examples readme
parent
e1e10103
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/README.md
+44
-38
44 additions, 38 deletions
examples/README.md
with
44 additions
and
38 deletions
examples/README.md
+
44
−
38
View file @
5d3cb77c
# examples
Examples of
go-for-apache-
dubbo
Examples of dubbo
-go
##
dubbo
##
overview
#### Build by these comman
d
*
helloworl
d
java server
```
bash
cd
dubbo/java-server
sh build.sh
```
A simplest example. It contain 'go-client', 'go-server', 'java-server' of dubbo protocol.
java client
```
bash
cd
dubbo/java-client
sh build.sh
```
*
general
go server
A general example. It had validated zookeeper registry and different parameter lists of service.
And it has a comprehensive testing with dubbo/jsonrpc protocol. You can refer to it to create your first complete dubbo-go project.
*
sh ./assembly/
\[
os]/
\[
environment].sh
```
bash
cd
dubbo/go-server
# $ARCH = [linux, mac, windows] and $ENV = [dev, release, test]
sh ./assembly/
$ARCH
/
$ENV
.sh
```
*
generic
go client
```
bash
cd
dubbo/go-client
# $ARCH = [linux, mac, windows] and $ENV = [dev, release, test]
sh ./assembly/
$ARCH
/
$ENV
.sh
```
A generic reference example. It show how to use generic reference of dubbo-go.
*
configcenter
Some examples of different config center. There is only one -- zookeeper at present.
#### Run by these command:
## How to build and run
> Take `helloworld` as an example
java server
```
bash
cd
dubbo/java-server/target
cd
helloworld/dubbo/java-server
sh build.sh
cd
./target
tar
-zxvf
user-info-server-0.2.0-assembly.tar.gz
cd
./user-info-server-0.2.0
sh ./bin/server.sh start
```
java client
```
bash
cd
dubbo/java-client/target
cd
helloworld/dubbo/java-client
sh build.sh
cd
./target
tar
-zxvf
user-info-client-0.2.0-assembly.tar.gz
cd
./user-info-client-0.2.0
sh ./bin/server.sh start
```
go server
*
$ARCH = [linux, mac, windows] and $ENV = [dev, release, test]
```
bash
cd
dubbo/go-server/target/linux/user_info_server-0.3.1-20190517-0930-release
#conf suffix appoint config file,
#such as server_zookeeper.yml when "sh ./bin/load.sh start is zookeeper",
#default server.yml
sh ./bin/load.sh start
[
conf suffix]
cd
helloworld/dubbo/go-server
sh ./assembly/
$ARCH
/
$ENV
.sh
cd
./target/linux/user_info_server-0.3.1-20190517-0930-release
# $SUFFIX is a suffix of config file,
# such as server_zookeeper.yml when $SUFFIX is "zookeeper",
# if $SUFFIX = "", default server.yml
sh ./bin/load.sh start
$SUFFIX
```
go client
*
$ARCH = [linux, mac, windows] and $ENV = [dev, release, test]
```
bash
cd
dubbo/go-client/target/linux/user_info_client-0.3.1-20190517-0921-release
cd
helloworld/dubbo/go-client
sh ./assembly/
$ARCH
/
$ENV
.sh
cd
./target/linux/user_info_client-0.3.1-20190517-0921-release
# $SUFFIX is a suffix of config file,
# such as client_zookeeper.yml when $SUFFIX = zookeeper",
# if $SUFFIX = "", config file is client.yml
sh ./bin/load_user_info_client.sh start
$SUFFIX
```
## jsonrpc
Similar to dubbo
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment