layotto icon indicating copy to clipboard operation
layotto copied to clipboard

feat: component ref

Open ZLBer opened this issue 2 years ago • 3 comments

What this PR does: add component ref

Which issue(s) this PR fixes:

Fixes #756

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


ZLBer avatar Aug 11 '22 15:08 ZLBer

Codecov Report

Base: 60.56% // Head: 60.39% // Decreases project coverage by -0.16% :warning:

Coverage data is based on head (2324e92) compared to base (c1c6354). Patch coverage: 44.77% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #761      +/-   ##
==========================================
- Coverage   60.56%   60.39%   -0.17%     
==========================================
  Files         133      133              
  Lines        8340     8398      +58     
==========================================
+ Hits         5051     5072      +21     
- Misses       2712     2738      +26     
- Partials      577      588      +11     
Impacted Files Coverage Δ
pkg/runtime/runtime.go 54.14% <8.33%> (-4.96%) :arrow_down:
pkg/runtime/ref/injector.go 81.81% <82.60%> (-0.80%) :arrow_down:
components/hello/helloworld/helloworld.go 100.00% <100.00%> (ø)
pkg/runtime/ref/contianer.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

codecov[bot] avatar Aug 23 '22 14:08 codecov[bot]

@seeflood 1.remove global component ref, 2.add a interface InjectConfigComponent like dynamic_coomponet,if one componet impl this interface ,we can inject configStrore for it. 3. add a example for this in helloworldcomponet.

if ok ,i will add configRef for other components

ZLBer avatar Sep 03 '22 09:09 ZLBer

@ZLBer Looks good to me overall. Please fix the CI errors (except the deadlinks)

seeflood avatar Sep 08 '22 11:09 seeflood

@ZLBer By the way, could u add documentation for this feature? Maybe in some other PR

seeflood avatar Oct 01 '22 09:10 seeflood

@seeflood sure, i will add a doc in another pr.

ZLBer avatar Oct 01 '22 12:10 ZLBer

@seeflood sure, i will add a doc in another pr.

Thanks! I submitted an issue https://github.com/mosn/layotto/issues/809 and assigned to you

seeflood avatar Oct 08 '22 08:10 seeflood