8000 feat: enhance about ip revise logic by CarlJi · Pull Request #290 · qiniu/goc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: enhance about ip revise logic #290

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

Merged
merged 3 commits into from
Jul 21, 2022
Merged

feat: enhance about ip revise logic #290

merged 3 commits into from
Jul 21, 2022

Conversation

CarlJi
Copy link
Collaborator
@CarlJi CarlJi commented Jul 21, 2022

No description provided.

@CarlJi CarlJi changed the title feat: a little refactor about ip revise logic feat: a little enhance about ip revise logic Jul 21, 2022
@CarlJi CarlJi changed the title feat: a little enhance about ip revise logic feat: enhance about ip revise logic Jul 21, 2022
@qiniu-bot qiniu-bot added size/L and removed size/M labels Jul 21, 2022
@CarlJi CarlJi force-pushed the iprevise branch 2 times, most recently from e7c783e to 4ff241e Compare July 21, 2022 08:13
@codecov
Copy link
codecov bot commented Jul 21, 2022

< 10000 a href="https://codecov.io/gh/qiniu/goc/pull/290?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiniu" rel="nofollow">Codecov Report

Merging #290 (09a9e57) into master (5ccfc73) will decrease coverage by 0.14%.
The diff coverage is 70.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #290      +/-   ##
==========================================
- Coverage   70.90%   70.76%   -0.15%     
==========================================
  Files          34       34              
  Lines        2038     2035       -3     
==========================================
- Hits         1445     1440       -5     
- Misses        480      481       +1     
- Partials      113      114       +1     
Flag Coverage Δ
e2e-1.16.x ?
e2e-1.17.x ?
e2e-1.18.x ?
unittest-1.16.x 70.66% <70.37%> (-0.24%) ⬇️
unittest-1.17.x 70.76% <70.37%> (-0.05%) ⬇️
unittest-1.18.x 70.66% <70.37%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/register.go 47.05% <25.00%> (+0.39%) ⬆️
cmd/server.go 45.45% <50.00%> (ø)
pkg/cover/server.go 83.03% <80.00%> (-0.81%) ⬇️
pkg/cover/client.go 89.33% <100.00%> (ø)
pkg/build/legacy.go 95.12% <0.00%> (-4.88%) ⬇️
pkg/build/gomodules.go 94.59% <0.00%> (+5.40%) ⬆️

)

func init() {
registerCmd.Flags().StringVarP(&center, "center", "", "http://127.0.0.1:7777", "cover profile host center")
registerCmd.Flags().StringVarP(&name, "name", "n", "", "service name")
registerCmd.Flags().StringVarP(&address, "address", "a", "", "service address")
registerCmd.Flags().StringVarP(&ipRevise, "ip_revise", "", "true", "whether to do ip revise during registering")
Copy link
Collaborator

Choose a reason for hiding this comment

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

BoolVarP better?


func init() {
serverCmd.Flags().StringVarP(&port, "port", "", ":7777", "listen port to start a coverage host center")
serverCmd.Flags().StringVarP(&localPersistence, "local-persistence", "", "_svrs_address.txt", "the file to save services address information")
serverCmd.Flags().BoolVarP(&iprevise, "ip_revise", "", true, "setting the network type(default:regist server use proxy or under nat、same network ect,direct:use register request parm)")
serverCmd.Flags().BoolVarP(&IPRevise, "ip_revise", "", true, "whether to do ip revise during registering. Recommend to set this as false if under NAT or Proxy environment")
Copy link
Collaborator

Choose a reason for hiding this comment

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

客户端和服务端的 ip_revise 参数类型未统一,命令行使用上会给用户造成困惑。

Copy link
Collaborator

Choose a reason for hiding this comment

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

目前是设计上的妥协,客户端期望是个默认值。

Copy link
Collaborator

Choose a reason for hiding this comment

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

服务端 ip_revise 设置默认值,客户端的 ip_revise 可以覆盖服务端默认值。

@qiniu-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CarlJi, lyyyuna

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lyyyuna lyyyuna merged commit 50b62f0 into qiniu:master Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0