mosn / pkg

Common packages used by other repos.
Apache License 2.0
26 stars 28 forks source link

move context to internal, and move variable & buffer pool into pkg #62

Closed nejisama closed 2 years ago

nejisama commented 2 years ago
codecov-commenter commented 2 years ago

Codecov Report

Base: 45.73% // Head: 49.56% // Increases project coverage by +3.83% :tada:

Coverage data is based on head (ce7fcec) compared to base (949046a). Patch coverage: 80.32% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #62 +/- ## ========================================== + Coverage 45.73% 49.56% +3.83% ========================================== Files 48 56 +8 Lines 2683 2992 +309 ========================================== + Hits 1227 1483 +256 - Misses 1374 1410 +36 - Partials 82 99 +17 ``` | [Impacted Files](https://codecov.io/gh/mosn/pkg/pull/62?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn) | Coverage Δ | | |---|---|---| | [variable/protocolres.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-dmFyaWFibGUvcHJvdG9jb2xyZXMuZ28=) | `61.90% <61.90%> (ø)` | | | [variable/api.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-dmFyaWFibGUvYXBpLmdv) | `71.42% <71.42%> (ø)` | | | [variable/factory.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-dmFyaWFibGUvZmFjdG9yeS5nbw==) | `73.17% <73.17%> (ø)` | | | [buffer/buffer.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-YnVmZmVyL2J1ZmZlci5nbw==) | `80.28% <80.28%> (ø)` | | | [variable/var.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-dmFyaWFibGUvdmFyLmdv) | `96.29% <96.29%> (ø)` | | | [buffer/bytebuffer\_ctx.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-YnVmZmVyL2J5dGVidWZmZXJfY3R4Lmdv) | `100.00% <100.00%> (ø)` | | | [buffer/log.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-YnVmZmVyL2xvZy5nbw==) | `50.00% <100.00%> (ø)` | | | [internal/context/context.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-aW50ZXJuYWwvY29udGV4dC9jb250ZXh0Lmdv) | `100.00% <100.00%> (ø)` | | | [internal/context/wrapper.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-aW50ZXJuYWwvY29udGV4dC93cmFwcGVyLmdv) | `100.00% <100.00%> (ø)` | | | [log/logger.go](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn#diff-bG9nL2xvZ2dlci5nbw==) | `50.83% <0.00%> (-1.25%)` | :arrow_down: | | ... and [1 more](https://codecov.io/gh/mosn/pkg/pull/62/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mosn)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

taoyuanyuan commented 2 years ago

建议换个目录,目前pkg/buffer是业务无关的,其他项目也可以复用,这次合入的都是mosn相关的,别人用不起来。

taoyuanyuan commented 2 years ago

这样没办法review呢,先搞个mosn里面的pr,merge之后在迁移到pkg?

nejisama commented 2 years ago

这样没办法review呢,先搞个mosn里面的pr,merge之后在迁移到pkg?

mosn里有pr 是https://github.com/mosn/mosn/pull/2055 先replace了一下的

taoyuanyuan commented 2 years ago

我的意思是没办法知道 buffer和varialbe自身的改动了

nejisama commented 2 years ago

建议换个目录,目前pkg/buffer是业务无关的,其他项目也可以复用,这次合入的都是mosn相关的,别人用不起来。

并没有强绑定。 以前绑定是因为context的问题,现在context已经拆分走了,只留下了最基本的。 其他项目也可以用新的这些buffer接口,只是用起来可能会相对复杂一些