-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into add_more_test_case
- Loading branch information
Showing
10 changed files
with
2 additions
and
805 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1 @@ | ||
# Local example | ||
|
||
## prepare etcd config | ||
|
||
run etcd local or in docker, then use etcdctl to set api config | ||
|
||
- export ETCDCTL_API=3 | ||
- if use docker, run `docker cp api_config.yaml mycontainer:/path` to copy file to docker | ||
- run `cat api_config.yaml | etcdctl put "/proxy/config/api"` to set api config | ||
|
||
|
||
## Start provider: | ||
|
||
config env: | ||
- CONF_PROVIDER_FILE_PATH=/XXX/dubbo-go-proxy/samples/admin/server/config/server.yml | ||
- APP_LOG_CONF_FILE=/XXX/dubbo-go-proxy/samples/admin/server/config/log.yml | ||
|
||
run samples/admin/server/app/server.go | ||
|
||
## Start proxy | ||
|
||
config program arguments: | ||
- -c /XXX/dubbo-go-proxy/samples/admin/proxy/conf.yaml | ||
- -a /XXX/dubbo-go-proxy/samples/admin/proxy/api_config.yaml | ||
|
||
to replace -a program arguments, should put api_meta_config in conf.yaml | ||
|
||
```yaml | ||
api_meta_config: | ||
address: "127.0.0.1:2379" | ||
api_config_path: "/pixiu/config/api" | ||
``` | ||
|
||
|
||
run cmd/proxy/proxy.go | ||
|
||
## | ||
|
||
curl "http://127.0.0.1:8888/api/v1/test-dubbo/user?name=tc" , the result: | ||
|
||
```json | ||
{ | ||
"age": 18, | ||
"id": "0001", | ||
"name": "tc" | ||
} | ||
``` | ||
|
||
## Start admin | ||
|
||
clone from https://github.com/dubbogo/pixiu-admin | ||
|
||
cd pixiu-admin | ||
|
||
run cmd/admin/admin.go | ||
|
||
config program arguments: | ||
- -c /xx/pixiu-admin/configs/admin_config.yaml | ||
please refer to https://www.yuque.com/docs/share/6e9de027-0548-45a1-a64c-d97529f5f5cc?# 《Pixiu Admin 》 |
Oops, something went wrong.