-
Notifications
You must be signed in to change notification settings - Fork 542
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: supports stream route API #2104
Conversation
✔️ Deploy Preview for apisix-dashboard ready! 🔨 Explore the source changes: 1647f57 🔍 Inspect the deploy log: https://app.netlify.com/sites/apisix-dashboard/deploys/61385b17600b060008573d8b 😎 Browse the preview: https://deploy-preview-2104--apisix-dashboard.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good feature.Thank you very much.
And there are still two things that need to be done.
- Add the e2e test for it.
- Use JSON schema to check the stream route.
We can do it in the next PR.
r.POST("/apisix/admin/stream_routes", wgin.Wraps(h.Create, | ||
wrapper.InputType(reflect.TypeOf(entity.StreamRoute{})))) | ||
r.PUT("/apisix/admin/stream_routes", wgin.Wraps(h.Update, | ||
wrapper.InputType(reflect.TypeOf(UpdateInput{})))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need this handler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little confused: how do we create a stream-route , we only support get and delete handler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use POST
to create a stream route. Right?
Refer: http://apisix.apache.org/docs/apisix/admin-api#stream-route
"github.com/stretchr/testify/mock" | ||
"net/http" | ||
"testing" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
api/internal/route.go
Outdated
@@ -18,6 +18,7 @@ package internal | |||
|
|||
import ( | |||
"fmt" | |||
"github.com/apisix/manager-api/internal/handler/stream_route" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
OK,got it! |
@Xu-Mj |
Agree with @nic-chen , and we plan to update the schema to latest APISIX 2.9 this week in other pr by @bzp2010 , @Xu-Mj can focus on improve code and test cases, unit test and e2e test,thanks a lot |
ok,got it |
ok |
Got it. 👍 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2104 +/- ##
==========================================
- Coverage 69.52% 69.39% -0.14%
==========================================
Files 189 190 +1
Lines 7275 7381 +106
Branches 823 824 +1
==========================================
+ Hits 5058 5122 +64
- Misses 1921 1952 +31
- Partials 296 307 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
r.POST("/apisix/admin/stream_routes", wgin.Wraps(h.Create, | ||
wrapper.InputType(reflect.TypeOf(entity.StreamRoute{})))) | ||
r.PUT("/apisix/admin/stream_routes", wgin.Wraps(h.Update, | ||
wrapper.InputType(reflect.TypeOf(UpdateInput{})))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use POST
to create a stream route. Right?
Refer: http://apisix.apache.org/docs/apisix/admin-api#stream-route
Which version support this feature? I don't see any place to config stream_route in v3.0 |
Please answer these questions before submitting a pull request, or your PR will get closed.
Why submit this pull request?
What changes will this PR take into?
supports dynamic configuration of stream-route
Related issues
fix/resolve #1986
Checklist: