You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@
4
4
5
5
**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.
6
6
7
-
## API Specification
7
+
## API Specification - Development guide
8
8
9
-
Data Plane API is built using [go-swagger](https://github.com/go-swagger/go-swagger) from the swagger spec found [here](https://github.com/haproxytech/dataplaneapi-specification/blob/master/build/haproxy_spec.yaml) using the following command.
9
+
Data Plane API is generated using [go-swagger](https://github.com/go-swagger/go-swagger) from the swagger spec found [here](https://github.com/haproxytech/dataplaneapi-specification/blob/master/build/haproxy_spec.yaml) using the following command.
10
10
11
11
```
12
12
./swagger generate server -f haproxy_spec.yaml \
@@ -38,10 +38,11 @@ Data Plane API is built using [go-swagger](https://github.com/go-swagger/go-swag
38
38
--tags=StickRule \
39
39
--tags=LogTarget \
40
40
--tags=Reloads \
41
-
--tags=ACL
41
+
--tags=ACL \
42
+
--tags=Defaults
42
43
```
43
44
44
-
This command generates some of the files in this project, which are marked with //DO NOT EDIT comments at the top of the files. These are not to be edited, as they are overwritten when specification is changed and the above-mentioned command is run.
45
+
This command generates some of the files in this project, which are marked with //DO NOT EDIT comments at the top of the files. These are not to be edited, as they are overwritten when specification is changed and the above-mentioned command is run. If you want to change those files, please change the specification and then generate them again.
4\. You can find the built binary in $GOPATH/bin directory.
83
+
3\. You can find the built binary in /build directory.
87
84
88
85
## Running the Data Plane API
89
86
90
87
Basic usage:
91
88
92
89
```
93
-
./dataplaneapi --help
94
90
Usage:
95
91
dataplaneapi [OPTIONS]
96
92
97
93
API for editing and managing haproxy instances
98
94
99
95
Application Options:
100
96
--scheme= the listeners to enable, this can be repeated and defaults to the schemes in the swagger spec
101
-
--cleanup-timeout= grace period for which to wait before shutting down the server (default: 10s)
97
+
--cleanup-timeout= grace period for which to wait before killing idle connections (default: 10s)
98
+
--graceful-timeout= grace period for which to wait before shutting down the server (default: 15s)
102
99
--max-header-size= controls the maximum number of bytes the server will read parsing the request header's keys and values, including the request line. It does not limit the size of the request body. (default: 1MiB)
103
100
--socket-path= the unix socket to listen on (default: /var/run/data-plane.sock)
104
101
--host= the IP to listen on (default: localhost) [$HOST]
@@ -110,7 +107,7 @@ Application Options:
110
107
--tls-host= the IP to listen on for tls, when not specified it's the same as --host [$TLS_HOST]
111
108
--tls-port= the port to listen on for secure connections, defaults to a random value [$TLS_PORT]
112
109
--tls-certificate= the certificate to use for secure connections [$TLS_CERTIFICATE]
113
-
--tls-key= the private key to use for secure conections [$TLS_PRIVATE_KEY]
110
+
--tls-key= the private key to use for secure connections [$TLS_PRIVATE_KEY]
114
111
--tls-ca= the certificate authority file to be used with mutual tls auth [$TLS_CA_CERTIFICATE]
115
112
--tls-listen-limit= limit the number of outstanding requests
116
113
--tls-keep-alive= sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)
@@ -121,7 +118,7 @@ HAProxy options:
121
118
-c, --config-file= Path to the haproxy configuration file (default: /etc/haproxy/haproxy.cfg)
122
119
-u, --userlist= Userlist in HAProxy configuration to use for API Basic Authentication (default: controller)
123
120
-b, --haproxy-bin= Path to the haproxy binary file (default: haproxy)
124
-
-d, --reload-delay= Minimum delay between two reloads (in s)
121
+
-d, --reload-delay= Minimum delay between two reloads (in s) (default: 5)
125
122
-r, --reload-cmd= Reload command
126
123
--reload-retention= Reload retention in days, every older reload id will be deleted (default: 1)
127
124
-t, --transaction-dir= Path to the transaction directory (default: /tmp/haproxy)
0 commit comments