All Projects → apache → apisix-go-plugin-runner

apache / apisix-go-plugin-runner

Licence: Apache-2.0 license
Go Plugin Runner for APISIX

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to apisix-go-plugin-runner

apisix-java-plugin-runner
APISIX Plugin Runner in Java
Stars: ✭ 57 (-49.56%)
Mutual labels:  gateway, apisix
apisix-python-plugin-runner
Apache APISIX Python plugin runner
Stars: ✭ 17 (-84.96%)
Mutual labels:  gateway, apisix
GatewayService
GatewayService (Ocelot).
Stars: ✭ 19 (-83.19%)
Mutual labels:  gateway
gateway
Springcloud gateway 的样例工程, 封装了一些常用的网关功能,如鉴权,数据级权限控制,验签,动态路由,日志,流控,降级等
Stars: ✭ 16 (-85.84%)
Mutual labels:  gateway
Zwave2Mqtt-docker
Docker container for Zwave2Mqtt Gateway and Control Panel app
Stars: ✭ 29 (-74.34%)
Mutual labels:  gateway
threema-msgapi-sdk-python
Threema Gateway Message SDK for Python
Stars: ✭ 37 (-67.26%)
Mutual labels:  gateway
redap
HTTP-to-LDAP Gateway
Stars: ✭ 27 (-76.11%)
Mutual labels:  gateway
kong-init
Declarative configuration tool for Kong
Stars: ✭ 38 (-66.37%)
Mutual labels:  gateway
chirpstack-concentratord
Concentrator HAL daemon for LoRa gateways.
Stars: ✭ 53 (-53.1%)
Mutual labels:  gateway
docker-kong-oidc
Kong + OIDC plugins
Stars: ✭ 83 (-26.55%)
Mutual labels:  gateway
chirpstack-gateway-os
Yocto based gateway images including ChirpStack components.
Stars: ✭ 101 (-10.62%)
Mutual labels:  gateway
tentacool
REST API to manage Linux networking via netlink
Stars: ✭ 63 (-44.25%)
Mutual labels:  gateway
Banklink
PHP payment library to easily integrate Baltic banklinks (supports old and new iPizza protocol), E-commerce gateaway (Estcard, Nets Estonia), Liisi Payment Link and Pocopay.
Stars: ✭ 34 (-69.91%)
Mutual labels:  gateway
serial2mqtt
Serial to MQTT adapter serivce
Stars: ✭ 21 (-81.42%)
Mutual labels:  gateway
GateWay
🥗OpenIoTHub Gateway for mobile(网关移动应用)
Stars: ✭ 25 (-77.88%)
Mutual labels:  gateway
Telephone-Remote-Control
No description or website provided.
Stars: ✭ 19 (-83.19%)
Mutual labels:  gateway
LogiEM
面向Elasticsearch研发与运维人员,围绕集群、索引构建的零侵入、多租户的Elasticsearch GUI管控平台
Stars: ✭ 209 (+84.96%)
Mutual labels:  gateway
TarsGateway
No description or website provided.
Stars: ✭ 46 (-59.29%)
Mutual labels:  gateway
pier
The Interchain gateway core implementation
Stars: ✭ 44 (-61.06%)
Mutual labels:  gateway
AppServer
AppServer is a Desktop Proxy + App Server for HTML, MD files for Developers and Enthusiasts.
Stars: ✭ 59 (-47.79%)
Mutual labels:  gateway

Go Plugin Runner for Apache APISIX

Go Report Card Build Status Codecov Godoc

Runs Apache APISIX plugins written in Go. Implemented as a sidecar that accompanies APISIX.

Status

This project is generally available.

Why apisix-go-plugin-runner

Apache APISIX offers many full-featured plugins covering areas such as authentication, security, traffic control, serverless, analytics & monitoring, transformations, logging.

It also provides highly extensible API, allowing common phases to be mounted, and users can use these API to develop their own plugins.

This project is APISIX Go side implementation that supports writing plugins in Go.

Currently, Go Plugin Runner is provided as a library. This is because the convention of Go is to compile all the code into an executable file.

Although there is a mechanism for Go Plugin to compile the plugin code into a dynamic link library and then load it into the binary. But as far as experience is concerned, there are still some imperfections that are not so simple and direct to use.

The structure of the apache/apisix-go-plugin-runner repository on GitHub is as follows:

.
├── cmd
├── internal
├── pkg

internal is responsible for the internal implementation, pkg displays the external interface, and cmd provides examples of the demonstration. There is a subdirectory of go-runner under the cmd directory. By reading the code in this section, you can learn how to use Go Plugin Runner in practical applications.

How it Works

At present, the communication between Go Plugin Runner and Apache APISIX is an RPC based on Unix socket. So Go Plugin Runner and Apache APISIX need to be deployed on the same machine.

Enable Go Plugin Runner

As mentioned earlier, Go Plugin Runner is managed by Apache APISIX, which runs as a child process of APISIX. So we have to configure and run this Runner in Apache APISIX.

The following configuration process will take the code cmd/go-runner in the apisix-go-plugin-runner project as an example.

  1. Compile the sample code. Executing make build generates the executable file go-runner.
  2. Make the following configuration in the conf/config.yaml file of Apache APISIX:
ext-plugin:
  cmd: ["/path/to/apisix-go-plugin-runner/go-runner", "run"]

With the above configuration, Apache APISIX pulls up go-runner when it starts and closes go-runner when it stops.

In view of the fact that apisix-go-plugin-runner is used in the form of a library in the actual development process, you need to replace the above example configuration with your own executable and startup instructions.

Finally, after the startup of Apache APISIX, go-runner will be started along with it.

Other configuration methods

Of course, if you need to take these three steps every time you verify the functionality in the development process, it is quite tedious. So we also provide another configuration that allows apisix-go-plugin-runner to run independently during development.

  1. The first thing to do is to compile the code.
  2. Configure the following in the conf/config.yaml file of Apache APISIX:
ext-plugin:
  path_for_test: /tmp/runner.sock
  1. Start go-runner with the following code.
APISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock ./go-runner run

Notice that we specify the socket address to be used for go-runner communication through the environment variable APISIX_LISTEN_ADDRESS. This address needs to be consistent with the configuration in Apache APISIX.

License

Apache 2.0 LICENSE

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].