-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(control): add dump upstream api #5259
Conversation
cc @spacewander , would you like to take a look at this? |
local upstream_id = uri_segs[4] | ||
local upstream = iter_add_get_upstream_info(upstreams, upstream_id) | ||
if not upstream then | ||
return 404, {error_msg = str_format("upstream[%s] not found", upstream_id)} |
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.
Do we need a space like upstream [%s]
?
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.
If this will be changed, the error msg from dump routes should be changed in this format too, so in my view, this is OK for me 😃
What this PR does / why we need it:
feat: add dump upstream api in control api
/v1/upstreams
upstream_id
with/v1/upstream/{upstream_id}
Pre-submission checklist: