HAProxy 数据平面 API
Data Plane API is a sidecar process that runs next to HAProxy and provides API endpoints for managing HAProxy. It requires HAProxy version 1.9.0 or higher.
In order to build the Data Plane API you need Go installed on your system with go modules support enabled, and execute the following steps:
1. Clone dataplaneapi repository
git clone https://github.com/haproxytech/dataplaneapi.git2. Run make build:
make build3. You can find the built binary in /build directory. TEST
Basic usage:
…Beside those options, everything can be defined in side of configuration file. See configuration file
You can test it by simply running:
./dataplaneapi --port 5555 -b /usr/sbin/haproxy -c /etc/haproxy/haproxy.cfg -d 5 -r "service haproxy reload" -s "service haproxy restart" -u dataplaneapi -t /tmp/haproxyDataplaneapi will require write permissions to the haproxy configuration file and the directories containing additional managed files (maps, ssl, spoe). The default locations can be overriden with command-line options. Test it out with curl, note that you need user/pass combination setup in HAProxy userlist in haproxy configuration (in above example: /etc/haproxy/haproxy.cfg, userlist controller):
curl -u : -H "Content-Type: application/json" "http://127.0.0.1:5555/v2/"If you are using secure passwords, supported algorithms are: md5, sha-256 and sha-512.
For more docs how to use the Data Plane API check our documentation
Alternatively, dataplaneapi serves its own interactive documentation relevant for the current build on the /v2/docs uri. Just point your browser to the host/port dataplane was started with (i.e. http://localhost:5555/v2/docs)
Check the documentation in the README.
Check the documentation in the README.
If you wish to contribute to this project please check Contributing Guide
暂无开放 Issues,或尚未同步最近议题。