Skip to content
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

feat: api-plugin #358

Merged
merged 14 commits into from
Dec 10, 2021
Merged

feat: api-plugin #358

merged 14 commits into from
Dec 10, 2021

Conversation

seeflood
Copy link
Member

@seeflood seeflood commented Dec 8, 2021

What this PR does:
Add api-plugin feature.
Users can add their own private grpc API based on their need.

  • add a demo
  • add docs

Quickstart: docs/en/start/api_plugin/helloworld.md
Design doc: docs/zh/design/api_plugin/design.md

  • more tests
  • plugin for grpc callback

Which issue(s) this PR fixes:

Fixes #200

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

Merging #358 (0325272) into main (a1dfd71) will decrease coverage by 1.37%.
The diff coverage is 35.03%.

❗ Current head 0325272 differs from pull request most recent head cbe2ecb. Consider uploading reports for the commit cbe2ecb to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #358      +/-   ##
==========================================
- Coverage   57.90%   56.53%   -1.38%     
==========================================
  Files          48       47       -1     
  Lines        2226     2220       -6     
==========================================
- Hits         1289     1255      -34     
- Misses        791      827      +36     
+ Partials      146      138       -8     
Impacted Files Coverage Δ
pkg/grpc/default_api/api_callback.go 20.38% <20.38%> (ø)
pkg/grpc/default_api/api.go 71.81% <50.00%> (ø)
pkg/runtime/runtime.go 54.71% <89.47%> (+3.06%) ⬆️
pkg/runtime/options.go 13.63% <100.00%> (+13.63%) ⬆️
pkg/wasm/imports.go 65.21% <100.00%> (ø)
pkg/grpc/grpc.go
pkg/grpc/options.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1dfd71...cbe2ecb. Read the comment docs.

@seeflood seeflood mentioned this pull request Dec 9, 2021
@seeflood seeflood merged commit ed0d806 into mosn:main Dec 10, 2021
@seeflood seeflood deleted the support_api_plugin branch December 10, 2021 07:49
apiForTest.AppCallbackConn = callbackClient
apiForTest.json = jsoniter.ConfigFastest
err = apiForTest.publishMessageGRPC(context.Background(), msg)
assert.Nil(t, err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this test is too simple that it nearly tests nothing. We need to at least test clientV1.OnTopicEvent is executed with the right input and output.

)
// 4. assert
assert.Nil(t, err)
assert.NotNil(t, server)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar issues here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layotto API plugin
4 participants