This is an automated email from the ASF dual-hosted git repository. shuaijinchao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/apisix-python-plugin-runner.git
commit 5b7b45a011e49907a56ec89205fe25b2890d20e4 Author: Janko <[email protected]> AuthorDate: Tue Aug 3 13:47:22 2021 +0800 feat: add python runner entry. --- src/main.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index c7d3a48..bf0a1cb 100644 --- a/src/main.py +++ b/src/main.py @@ -14,9 +14,30 @@ # See the License for the specific language governing permissions and # limitations under the License. # -def main() -> None: +import click +from runner.socket.server import Server as A6SocketServer + +RUNNER_VERSION = "0.1.0" +RUNNER_SOCKET = "/tmp/runner.sock" + + [email protected]() [email protected]_option(version=RUNNER_VERSION) +def runner() -> None: pass [email protected]() [email protected]('--debug/--no-debug', help='enable or disable debug, default disable.', default=False) +def start(debug) -> None: + click.echo(debug) + server = A6SocketServer(RUNNER_SOCKET) + server.receive() + + +def main() -> None: + runner() + + if __name__ == '__main__': main()
