Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ftr: Add dubbo-go-cli telnet tool support #818

Merged
merged 32 commits into from
Feb 3, 2021

Conversation

LaurenceLiZhixin
Copy link
Contributor

@LaurenceLiZhixin LaurenceLiZhixin commented Oct 29, 2020

What this PR does:
增加了dubbo-go的cli命令行工具,可以方便用户直连特定服务,发送包含特定参数的rpc请求,并展现结果。

Which issue(s) this PR fixes:

Special notes for your reviewer:
支持嵌套struct,目前只支持单个参数的请求包和回包。
数据类型由于需要在json中定义,只支持golang基本数据类型:string、整形、浮点。

Does this PR introduce a user-facing change?:
NONE


@codecov-io
Copy link

codecov-io commented Oct 31, 2020

Codecov Report

Merging #818 (18ab1c4) into 1.5 (17c4a9e) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              1.5     #818      +/-   ##
==========================================
+ Coverage   59.45%   59.46%   +0.01%     
==========================================
  Files         261      261              
  Lines       12950    12973      +23     
==========================================
+ Hits         7700     7715      +15     
- Misses       4276     4282       +6     
- Partials      974      976       +2     
Impacted Files Coverage Δ
cluster/cluster_impl/failback_cluster_invoker.go 73.49% <0.00%> (-2.41%) ⬇️
...rotocol/protocolwrapper/protocol_filter_wrapper.go 48.14% <0.00%> (-1.86%) ⬇️
remoting/getty/listener.go 39.79% <0.00%> (-1.30%) ⬇️
remoting/getty/getty_client.go 44.08% <0.00%> (-0.22%) ⬇️
common/url.go 60.89% <0.00%> (ø)
remoting/kubernetes/listener.go 50.52% <0.00%> (ø)
remoting/kubernetes/watch.go 79.12% <0.00%> (+2.19%) ⬆️
remoting/kubernetes/client.go 75.00% <0.00%> (+2.94%) ⬆️
cluster/cluster_impl/base_cluster_invoker.go 61.11% <0.00%> (+8.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 17c4a9e...18ab1c4. Read the comment docs.

@zouyx zouyx added the enhancement New feature or request label Nov 3, 2020
@zouyx zouyx added this to the v1.5.5 milestone Nov 3, 2020
@@ -0,0 +1,18 @@
# dubbo-go-cli

### 1. 解决问题
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, guy, pls using English in an Apache project. Or u rename this file to readme_cn.md and add an English readme.

}, nil
}

func createTCPAddr(host string, port int) string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls using net.JoinHostPort instead.

seqId := t.addPendingResponse(userPkg)
defer t.removePendingResponse(seqId)

requestDataChannel := make(chan []byte)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not need to set its length for this chan?


requestDataChannel := make(chan []byte)
doneChannel := make(chan bool)
responseDataChannel := make(chan []byte)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same as above

)

var (
protocols = make(map[string]func() protocol.Protocol)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls set its init length param, such as 8

@@ -0,0 +1,132 @@
# dubbo-go-cli 使用示例
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same as above readme. pls rename this file to readme_cn.md and add an english readme.

@LaurenceLiZhixin
Copy link
Contributor Author

Now waiting for pr: apache/dubbo-go-hessian2#243 to be merged.
Then I'll refer the latest hessian2 pkg and complete this pr.

@LaurenceLiZhixin
Copy link
Contributor Author

I fix the change of hessian pkg, and problems above. Now I think it's able to merge.
Reviewer can try example in Readme file, to check if it works as hoped.

@zouyx zouyx removed this from the v1.5.5 milestone Nov 27, 2020

### Third party dependence(temporary)

github.com/LaurenceLiZhixin/dubbo-go-hessian2 \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why using ur branch?

### Third party dependence(temporary)

github.com/LaurenceLiZhixin/dubbo-go-hessian2 \
github.com/LaurenceLiZhixin/json-interface-parser
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls submit ur code to github.com/dubbogo/gost.

@AlexStocks AlexStocks force-pushed the develop branch 3 times, most recently from d12bf6a to e633a73 Compare January 9, 2021 09:35
@AlexStocks AlexStocks force-pushed the develop branch 2 times, most recently from 603f989 to 794ab77 Compare January 10, 2021 13:12
@AlexStocks AlexStocks force-pushed the develop branch 2 times, most recently from 25c3b98 to 9a666eb Compare January 23, 2021 11:12
@AlexStocks AlexStocks added this to the v1.5.6 milestone Jan 23, 2021
@AlexStocks
Copy link
Contributor

have u finished ur work? if so, pls fix the github action failure.

@cityiron cityiron changed the base branch from develop to 1.5 January 26, 2021 13:55
@LaurenceLiZhixin LaurenceLiZhixin changed the base branch from 1.5 to develop January 27, 2021 03:04
@LaurenceLiZhixin LaurenceLiZhixin changed the base branch from develop to 1.5 January 27, 2021 03:05
@LaurenceLiZhixin
Copy link
Contributor Author

I have finished my work.

have u finished ur work? if so, pls fix the github action failure.

@cityiron cityiron merged commit 3ae865a into apache:1.5 Feb 3, 2021
AlexStocks pushed a commit that referenced this pull request Apr 14, 2021
Ftr: Add dubbo-go-cli telnet tool support
@justxuewei justxuewei mentioned this pull request Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants