Skip to content

Commit cf63726

Browse files
committed
DOC: Update README.md
1 parent 0fd1943 commit cf63726

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
**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.
66

7-
## API Specification
7+
## API Specification - Development guide
88

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.
1010

1111
```
1212
./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
3838
--tags=StickRule \
3939
--tags=LogTarget \
4040
--tags=Reloads \
41-
--tags=ACL
41+
--tags=ACL \
42+
--tags=Defaults
4243
```
4344

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.
4546

4647
## Dependencies
4748

@@ -64,41 +65,37 @@ External dependecies:
6465
- [mapstructure](https://github.com/mitchellh/mapstructure)
6566
- [crypt](https://github.com/GehirnInc/crypt)
6667

67-
## Building
68+
## Building the Data Plane API
6869

69-
Following steps are required for building:
70-
71-
1\. Set your GOPATH variable
72-
73-
2\. Clone dataplaneapi repository into $GOPATH/src/github.com/haproxytech
70+
1\. Clone dataplaneapi repository into $GOPATH/src/github.com/haproxytech
7471

7572
```
7673
cd $GOPATH/src/github.com/haproxytech
7774
git clone https://github.com/haproxytech/dataplaneapi.git
7875
```
7976

80-
3\. Run make build:
77+
2\. Run make build:
8178

8279
```
8380
make build
8481
```
8582

86-
4\. You can find the built binary in $GOPATH/bin directory.
83+
3\. You can find the built binary in /build directory.
8784

8885
## Running the Data Plane API
8986

9087
Basic usage:
9188

9289
```
93-
./dataplaneapi --help
9490
Usage:
9591
dataplaneapi [OPTIONS]
9692
9793
API for editing and managing haproxy instances
9894
9995
Application Options:
10096
--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)
10299
--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)
103100
--socket-path= the unix socket to listen on (default: /var/run/data-plane.sock)
104101
--host= the IP to listen on (default: localhost) [$HOST]
@@ -110,7 +107,7 @@ Application Options:
110107
--tls-host= the IP to listen on for tls, when not specified it's the same as --host [$TLS_HOST]
111108
--tls-port= the port to listen on for secure connections, defaults to a random value [$TLS_PORT]
112109
--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]
114111
--tls-ca= the certificate authority file to be used with mutual tls auth [$TLS_CA_CERTIFICATE]
115112
--tls-listen-limit= limit the number of outstanding requests
116113
--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:
121118
-c, --config-file= Path to the haproxy configuration file (default: /etc/haproxy/haproxy.cfg)
122119
-u, --userlist= Userlist in HAProxy configuration to use for API Basic Authentication (default: controller)
123120
-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)
125122
-r, --reload-cmd= Reload command
126123
--reload-retention= Reload retention in days, every older reload id will be deleted (default: 1)
127124
-t, --transaction-dir= Path to the transaction directory (default: /tmp/haproxy)
@@ -133,6 +130,9 @@ Logging options:
133130
--log-level=[trace|debug|info|warning|error] Logging level (default: warning)
134131
--log-format=[text|JSON] Logging format (default: text)
135132
133+
Show version:
134+
-v, --version Version and build information
135+
136136
Help Options:
137137
-h, --help Show this help message
138138
```

0 commit comments

Comments
 (0)