You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/04/24 16:31:27 UTC
[GitHub] [dubbo-go-pixiu] lmhmhl opened a new pull request #159: Refractor pixiu_start.go
lmhmhl opened a new pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159
Here are some changes as follow:
1. Refractor `pixiu_start.go`, which extract the inner method as an independent method and delete some useless blank line and comment.
2. Change the plugin registered by hand to auto using `init()` method when import the related package.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] lmhmhl closed pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
lmhmhl closed pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#issuecomment-826118753
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#159](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cff2b7a) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/2173648f31aa3d63c7dcf0aeac5986344994fd52?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2173648) will **increase** coverage by `0.54%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #159 +/- ##
===========================================
+ Coverage 42.30% 42.84% +0.54%
===========================================
Files 33 33
Lines 1742 1741 -1
===========================================
+ Hits 737 746 +9
+ Misses 904 892 -12
- Partials 101 103 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/config/api\_config.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmZpZy9hcGlfY29uZmlnLmdv) | `10.60% <ø> (ø)` | |
| [pkg/filter/recovery/recovery.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZWNvdmVyeS9yZWNvdmVyeS5nbw==) | `100.00% <ø> (+22.22%)` | :arrow_up: |
| [pkg/filter/response/response.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZXNwb25zZS9yZXNwb25zZS5nbw==) | `10.00% <ø> (+4.61%)` | :arrow_up: |
| [pkg/filter/timeout/timeout.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci90aW1lb3V0L3RpbWVvdXQuZ28=) | `96.29% <ø> (+3.70%)` | :arrow_up: |
| [pkg/pixiu/pixiu\_start.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3BpeGl1L3BpeGl1X3N0YXJ0Lmdv) | `0.00% <ø> (ø)` | |
| [pkg/service/api/discovery\_service.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NlcnZpY2UvYXBpL2Rpc2NvdmVyeV9zZXJ2aWNlLmdv) | `65.00% <ø> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2173648...cff2b7a](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter commented on pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#issuecomment-826118753
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#159](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b3735d8) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/a16efb1ffe394d42dc8ec0f8b77bf3428d5eacd5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a16efb1) will **increase** coverage by `0.55%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #159 +/- ##
===========================================
+ Coverage 40.60% 41.15% +0.55%
===========================================
Files 35 35
Lines 1692 1691 -1
===========================================
+ Hits 687 696 +9
+ Misses 903 891 -12
- Partials 102 104 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/config/api\_config.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmZpZy9hcGlfY29uZmlnLmdv) | `10.60% <ø> (ø)` | |
| [pkg/filter/recovery/recovery.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZWNvdmVyeS9yZWNvdmVyeS5nbw==) | `100.00% <ø> (+22.22%)` | :arrow_up: |
| [pkg/filter/response/response.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZXNwb25zZS9yZXNwb25zZS5nbw==) | `10.00% <ø> (+4.61%)` | :arrow_up: |
| [pkg/filter/timeout/timeout.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci90aW1lb3V0L3RpbWVvdXQuZ28=) | `96.29% <ø> (+3.70%)` | :arrow_up: |
| [pkg/pixiu/pixiu\_start.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3BpeGl1L3BpeGl1X3N0YXJ0Lmdv) | `0.00% <ø> (ø)` | |
| [pkg/service/api/discovery\_service.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NlcnZpY2UvYXBpL2Rpc2NvdmVyeV9zZXJ2aWNlLmdv) | `65.00% <ø> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a16efb1...b3735d8](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#discussion_r619829067
##########
File path: cmd/pixiu/control.go
##########
@@ -18,6 +18,7 @@
package main
import (
+ "github.com/apache/dubbo-go-pixiu/pkg/model"
Review comment:
move it to the 3rd import block.
##########
File path: cmd/pixiu/control.go
##########
@@ -133,3 +97,47 @@ var (
},
}
)
+
+func PixiuAction(c *cli.Context) error {
+ configPath := c.String("config")
+ apiConfigPath := c.String("api-config")
+ flagLogLevel := c.String("log-level")
+ logConfPath := c.String("log-config")
+ bootstrap := config.Load(configPath)
+ if logLevel, ok := flagToLogLevel[flagLogLevel]; ok {
+ logger.SetLoggerLevel(logLevel)
+ }
+ logger.InitLog(logConfPath)
+ if err := GetAPIConfig(bootstrap, apiConfigPath); err != nil {
+ return err
+ }
+ InitNumCPU(c)
+ pixiu.Start(bootstrap)
+ return nil
+}
+
+func GetAPIConfig(bootstrap *model.Bootstrap, apiConfigPath string) error {
Review comment:
func GetAPIConfig(bootstrap *model.Bootstrap, apiConfigPath string) error {
metaConfig := bootstrap.GetAPIMetaConfig()
if metaConfig == nil {
if _, err := config.LoadAPIConfigFromFile(apiConfigPath); err != nil {
logger.Errorf("load api config error:%+v", err)
return err
}
return nil
}
if _, err := config.LoadAPIConfig(bootstrap.GetAPIMetaConfig()); err != nil {
logger.Errorf("load api config from etcd error:%+v", err)
return err
}
return nil
}
##########
File path: cmd/pixiu/control.go
##########
@@ -133,3 +97,47 @@ var (
},
}
)
+
+func PixiuAction(c *cli.Context) error {
+ configPath := c.String("config")
+ apiConfigPath := c.String("api-config")
+ flagLogLevel := c.String("log-level")
+ logConfPath := c.String("log-config")
+ bootstrap := config.Load(configPath)
+ if logLevel, ok := flagToLogLevel[flagLogLevel]; ok {
+ logger.SetLoggerLevel(logLevel)
+ }
+ logger.InitLog(logConfPath)
+ if err := GetAPIConfig(bootstrap, apiConfigPath); err != nil {
+ return err
+ }
+ InitNumCPU(c)
+ pixiu.Start(bootstrap)
+ return nil
+}
+
+func GetAPIConfig(bootstrap *model.Bootstrap, apiConfigPath string) error {
Review comment:
```go
func GetAPIConfig(bootstrap *model.Bootstrap, apiConfigPath string) error {
metaConfig := bootstrap.GetAPIMetaConfig()
if metaConfig == nil {
if _, err := config.LoadAPIConfigFromFile(apiConfigPath); err != nil {
logger.Errorf("load api config error:%+v", err)
return err
}
return nil
}
if _, err := config.LoadAPIConfig(bootstrap.GetAPIMetaConfig()); err != nil {
logger.Errorf("load api config from etcd error:%+v", err)
return err
}
return nil
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] mark4z commented on pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
mark4z commented on pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#issuecomment-864551581
this pr maybe can not merged, I will refractor the filter later. @lmhmhl @xiaoliu10
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter commented on pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#issuecomment-826118753
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#159](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b3735d8) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/a16efb1ffe394d42dc8ec0f8b77bf3428d5eacd5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a16efb1) will **increase** coverage by `0.55%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #159 +/- ##
===========================================
+ Coverage 40.60% 41.15% +0.55%
===========================================
Files 35 35
Lines 1692 1691 -1
===========================================
+ Hits 687 696 +9
+ Misses 903 891 -12
- Partials 102 104 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/config/api\_config.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmZpZy9hcGlfY29uZmlnLmdv) | `10.60% <ø> (ø)` | |
| [pkg/filter/recovery/recovery.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZWNvdmVyeS9yZWNvdmVyeS5nbw==) | `100.00% <ø> (+22.22%)` | :arrow_up: |
| [pkg/filter/response/response.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZXNwb25zZS9yZXNwb25zZS5nbw==) | `10.00% <ø> (+4.61%)` | :arrow_up: |
| [pkg/filter/timeout/timeout.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci90aW1lb3V0L3RpbWVvdXQuZ28=) | `96.29% <ø> (+3.70%)` | :arrow_up: |
| [pkg/pixiu/pixiu\_start.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3BpeGl1L3BpeGl1X3N0YXJ0Lmdv) | `0.00% <ø> (ø)` | |
| [pkg/service/api/discovery\_service.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NlcnZpY2UvYXBpL2Rpc2NvdmVyeV9zZXJ2aWNlLmdv) | `65.00% <ø> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a16efb1...b3735d8](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#discussion_r619829647
##########
File path: cmd/pixiu/control.go
##########
@@ -133,3 +97,47 @@ var (
},
}
)
+
+func PixiuAction(c *cli.Context) error {
+ configPath := c.String("config")
+ apiConfigPath := c.String("api-config")
+ flagLogLevel := c.String("log-level")
+ logConfPath := c.String("log-config")
+ bootstrap := config.Load(configPath)
+ if logLevel, ok := flagToLogLevel[flagLogLevel]; ok {
+ logger.SetLoggerLevel(logLevel)
+ }
+ logger.InitLog(logConfPath)
+ if err := GetAPIConfig(bootstrap, apiConfigPath); err != nil {
+ return err
+ }
+ InitNumCPU(c)
+ pixiu.Start(bootstrap)
+ return nil
+}
+
+func GetAPIConfig(bootstrap *model.Bootstrap, apiConfigPath string) error {
Review comment:
func GetAPIConfig(bootstrap *model.Bootstrap, apiConfigPath string) error {
metaConfig := bootstrap.GetAPIMetaConfig()
if metaConfig == nil {
if _, err := config.LoadAPIConfigFromFile(apiConfigPath); err != nil {
logger.Errorf("load api config error:%+v", err)
return err
}
return nil
}
if _, err := config.LoadAPIConfig(bootstrap.GetAPIMetaConfig()); err != nil {
logger.Errorf("load api config from etcd error:%+v", err)
return err
}
return nil
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#issuecomment-826118753
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#159](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cff2b7a) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/2173648f31aa3d63c7dcf0aeac5986344994fd52?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2173648) will **increase** coverage by `0.54%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #159 +/- ##
===========================================
+ Coverage 42.30% 42.84% +0.54%
===========================================
Files 33 33
Lines 1742 1741 -1
===========================================
+ Hits 737 746 +9
+ Misses 904 892 -12
- Partials 101 103 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/config/api\_config.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmZpZy9hcGlfY29uZmlnLmdv) | `10.60% <ø> (ø)` | |
| [pkg/filter/recovery/recovery.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZWNvdmVyeS9yZWNvdmVyeS5nbw==) | `100.00% <ø> (+22.22%)` | :arrow_up: |
| [pkg/filter/response/response.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZXNwb25zZS9yZXNwb25zZS5nbw==) | `10.00% <ø> (+4.61%)` | :arrow_up: |
| [pkg/filter/timeout/timeout.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci90aW1lb3V0L3RpbWVvdXQuZ28=) | `96.29% <ø> (+3.70%)` | :arrow_up: |
| [pkg/pixiu/pixiu\_start.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3BpeGl1L3BpeGl1X3N0YXJ0Lmdv) | `0.00% <ø> (ø)` | |
| [pkg/service/api/discovery\_service.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NlcnZpY2UvYXBpL2Rpc2NvdmVyeV9zZXJ2aWNlLmdv) | `65.00% <ø> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2173648...cff2b7a](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] williamfeng323 commented on pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
williamfeng323 commented on pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#issuecomment-858394091
review dog的麻烦处理下
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#discussion_r619829067
##########
File path: cmd/pixiu/control.go
##########
@@ -18,6 +18,7 @@
package main
import (
+ "github.com/apache/dubbo-go-pixiu/pkg/model"
Review comment:
move it to the 3rd import block.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] lmhmhl closed pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
lmhmhl closed pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] codecov-commenter edited a comment on pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#issuecomment-826118753
# [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#159](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fff7173) into [develop](https://codecov.io/gh/apache/dubbo-go-pixiu/commit/a16efb1ffe394d42dc8ec0f8b77bf3428d5eacd5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a16efb1) will **increase** coverage by `0.55%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/graphs/tree.svg?width=650&height=150&src=pr&token=NM3dY2xLkL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## develop #159 +/- ##
===========================================
+ Coverage 40.60% 41.15% +0.55%
===========================================
Files 35 35
Lines 1692 1691 -1
===========================================
+ Hits 687 696 +9
+ Misses 903 891 -12
- Partials 102 104 +2
```
| [Impacted Files](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/config/api\_config.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmZpZy9hcGlfY29uZmlnLmdv) | `10.60% <ø> (ø)` | |
| [pkg/filter/recovery/recovery.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZWNvdmVyeS9yZWNvdmVyeS5nbw==) | `100.00% <ø> (+22.22%)` | :arrow_up: |
| [pkg/filter/response/response.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci9yZXNwb25zZS9yZXNwb25zZS5nbw==) | `10.00% <ø> (+4.61%)` | :arrow_up: |
| [pkg/filter/timeout/timeout.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2ZpbHRlci90aW1lb3V0L3RpbWVvdXQuZ28=) | `96.29% <ø> (+3.70%)` | :arrow_up: |
| [pkg/pixiu/pixiu\_start.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3BpeGl1L3BpeGl1X3N0YXJ0Lmdv) | `0.00% <ø> (ø)` | |
| [pkg/service/api/discovery\_service.go](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NlcnZpY2UvYXBpL2Rpc2NvdmVyeV9zZXJ2aWNlLmdv) | `65.00% <ø> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [a16efb1...fff7173](https://codecov.io/gh/apache/dubbo-go-pixiu/pull/159?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-pixiu] AlexStocks commented on a change in pull request #159: Refractor pixiu_start.go
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #159:
URL: https://github.com/apache/dubbo-go-pixiu/pull/159#discussion_r619829647
##########
File path: cmd/pixiu/control.go
##########
@@ -133,3 +97,47 @@ var (
},
}
)
+
+func PixiuAction(c *cli.Context) error {
+ configPath := c.String("config")
+ apiConfigPath := c.String("api-config")
+ flagLogLevel := c.String("log-level")
+ logConfPath := c.String("log-config")
+ bootstrap := config.Load(configPath)
+ if logLevel, ok := flagToLogLevel[flagLogLevel]; ok {
+ logger.SetLoggerLevel(logLevel)
+ }
+ logger.InitLog(logConfPath)
+ if err := GetAPIConfig(bootstrap, apiConfigPath); err != nil {
+ return err
+ }
+ InitNumCPU(c)
+ pixiu.Start(bootstrap)
+ return nil
+}
+
+func GetAPIConfig(bootstrap *model.Bootstrap, apiConfigPath string) error {
Review comment:
```go
func GetAPIConfig(bootstrap *model.Bootstrap, apiConfigPath string) error {
metaConfig := bootstrap.GetAPIMetaConfig()
if metaConfig == nil {
if _, err := config.LoadAPIConfigFromFile(apiConfigPath); err != nil {
logger.Errorf("load api config error:%+v", err)
return err
}
return nil
}
if _, err := config.LoadAPIConfig(bootstrap.GetAPIMetaConfig()); err != nil {
logger.Errorf("load api config from etcd error:%+v", err)
return err
}
return nil
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org