You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/03/25 05:41:51 UTC
[GitHub] [skywalking-cli] fgksgf opened a new pull request #92: Move `parseScope` to pkg
fgksgf opened a new pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92
--
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
[GitHub] [skywalking-cli] kezhenxu94 edited a comment on pull request #92: Move `parseScope` to pkg
Posted by GitBox <gi...@apache.org>.
kezhenxu94 edited a comment on pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92#issuecomment-806390318
> 1. What's the purpose of introducing a submodule to `gen-codes/skywalking/network`? If other projects would like to import cli, they have to `replace` this repo in their `go.mod` like swck did https://github.com/apache/skywalking-swck/blob/master/go.mod#L28
We have command to report events (recently introduced), which needs the related protocol
--
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
[GitHub] [skywalking-cli] kezhenxu94 merged pull request #92: Move `parseScope` to pkg
Posted by GitBox <gi...@apache.org>.
kezhenxu94 merged pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92
--
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
[GitHub] [skywalking-cli] hanahmily commented on pull request #92: Move `parseScope` to pkg
Posted by GitBox <gi...@apache.org>.
hanahmily commented on pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92#issuecomment-806388295
After reading relevant cli codes, could we refactor followings
1. Move action functions from `internal/commands` to `pkg/commands`. For example:
`pkg/commands/metrics/linear/linear-metrics.go`
```go
func Linear(ctx *cli.Context) (api.MetricsValues, Error){
end := ctx.String("end")
start := ctx.String("start")
step := ctx.Generic("step")
metricsName := ctx.String("name")
entity := interceptor.ParseEntity(ctx)
duration := api.Duration{
Start: start,
End: end,
Step: step.(*model.StepEnumValue).Selected,
}
metricsValues, err := metrics.LinearIntValues(ctx, api.MetricsCondition{
Name: metricsName,
Entity: entity,
}, duration)
if err != nil {
return nil, err
}
return metricsValues, nil
}
```
`internal/commands/metrics/linear/linear-metrics.go`
```go
Action: func(ctx *cli.Context) error {
metricsValues, err := pkglinear.Linear(ctx)
if err != nil {
return err
}
return display.Display(ctx, &displayable.Displayable{Data: utils.MetricsValuesToMap(duration, metricsValues)})
},
```
The above convention will simplify the usage of CLI API. BTW, the event relevant API is missing in `pkg`.
--
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
[GitHub] [skywalking-cli] kezhenxu94 edited a comment on pull request #92: Move `parseScope` to pkg
Posted by GitBox <gi...@apache.org>.
kezhenxu94 edited a comment on pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92#issuecomment-806389878
@hanahmily are you looking at the latest codes? I think your comments above is what we do currently
--
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
[GitHub] [skywalking-cli] kezhenxu94 commented on pull request #92: Move `parseScope` to pkg
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92#issuecomment-806390318
> 1. What's the purpose of introducing a submodule to `gen-codes/skywalking/network`? If other projects would like to import cli, they have to `replace` this repo in their `go.mod` like swck did https://github.com/apache/skywalking-swck/blob/master/go.mod#L28
We have command to report events (recently introduced)
--
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
[GitHub] [skywalking-cli] hanahmily commented on pull request #92: Move `parseScope` to pkg
Posted by GitBox <gi...@apache.org>.
hanahmily commented on pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92#issuecomment-806389340
2. What's the purpose of introducing a submodule to `gen-codes/skywalking/network`? If other projects would like to import cli, they have to `replace` this repo in their `go.mod` like swck did https://github.com/apache/skywalking-swck/blob/master/go.mod#L28
--
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
[GitHub] [skywalking-cli] fgksgf commented on pull request #92: Move `parseScope` to pkg
Posted by GitBox <gi...@apache.org>.
fgksgf commented on pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92#issuecomment-806395223
@kezhenxu94 could you help check the CI ?
--
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
[GitHub] [skywalking-cli] kezhenxu94 commented on pull request #92: Move `parseScope` to pkg
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #92:
URL: https://github.com/apache/skywalking-cli/pull/92#issuecomment-806389878
@hanahmily are you seeing the latest codes? I think your comments above is what we do currently
--
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