-
Notifications
You must be signed in to change notification settings - Fork 129
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
Conversation
e7c783e
to
4ff241e
Compare
< 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
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
|
) | ||
|
||
func init() { | ||
registerCmd.Flags().StringVarP(¢er, "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") |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
客户端和服务端的 ip_revise 参数类型未统一,命令行使用上会给用户造成困惑。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前是设计上的妥协,客户端期望是个默认值。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
服务端 ip_revise 设置默认值,客户端的 ip_revise 可以覆盖服务端默认值。
[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 |
No description provided.