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: add control API #3048

Merged
merged 5 commits into from
Dec 18, 2020
Merged

feat: add control API #3048

merged 5 commits into from
Dec 18, 2020

Conversation

spacewander
Copy link
Member

Signed-off-by: spacewander spacewanderlzx@gmail.com

What this PR does / why we need it:

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
.travis/apisix_cli_test/test_ci_only.sh Outdated Show resolved Hide resolved
doc/control-api.md Outdated Show resolved Hide resolved
spacewander and others added 2 commits December 15, 2020 19:23
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
port: 9090
```

Note that the control API server should not be configured to listen the public traffic!
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Note that the control API server should not be configured to listen the public traffic!
Note that the control API server should not be configured to listen to public traffic!

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

## Control API Added via plugin

Plugin can add its control API when it is enabled.
If a plugin adds such control API, please refer to each plugin's documentation for those APIs.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If a plugin adds such control API, please refer to each plugin's documentation for those APIs.
If a plugin adds such a control API, please refer to each plugin's documentation for those APIs.

-- /v1/schema
{
methods = {"GET"},
uri = "/schema",
Copy link
Member

Choose a reason for hiding this comment

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

use uris is better, we'll remove uri later

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

conf/config-default.yaml Show resolved Hide resolved
apisix/control/router.lua Outdated Show resolved Hide resolved
apisix/plugins/example-plugin.lua Show resolved Hide resolved
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
@spacewander
Copy link
Member Author

Related issue: #2798 #3022

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
Copy link
Member

@membphis membphis left a comment

Choose a reason for hiding this comment

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

LGTM

conf/config-default.yaml Show resolved Hide resolved

## Control API Added via plugin

Plugin can add its control API when it is enabled.
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we add the control API example in plugin-develop.md?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but we can do it later. It seems the plugin-develop.md is outdated and need to be rewritten.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK.

Copy link
Member

@nic-chen nic-chen left a comment

Choose a reason for hiding this comment

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

LGTM

@spacewander spacewander merged commit 924a30d into apache:master Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants