Skip to content

Commit e278419

Browse files
authored
docs: Unify style of CLI arguments (#1050)
Update CLI option examples from 2 leading dashes to just 1.
1 parent 8c3700e commit e278419

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/hooks.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ With file hooks enabled, tusd will execute scripts or other executable files in
175175

176176
#### Hook Directory
177177

178-
By default, the file hook system is disabled. To enable it, pass the `--hooks-dir` option to the tusd binary. The flag's value will be a path, the **hook directory**, relative to the current working directory, pointing to the folder containing the executable **hook files**:
178+
By default, the file hook system is disabled. To enable it, pass the `-hooks-dir` option to the tusd binary. The flag's value will be a path, the **hook directory**, relative to the current working directory, pointing to the folder containing the executable **hook files**:
179179

180180
```bash
181-
$ tusd --hooks-dir ./path/to/hooks/
181+
$ tusd -hooks-dir ./path/to/hooks/
182182

183183
[tusd] Using './path/to/hooks/' for hooks
184184
[tusd] Using './data' as directory storage.
@@ -206,10 +206,10 @@ An example is available at [/examples/hooks/file](/examples/hooks/file).
206206

207207
### HTTP(S) Hooks
208208

209-
HTTP(S) Hooks are the second type of hooks supported by tusd. It is disabled by default. To enable it, pass the `--hooks-http` option to the tusd binary. The flag's value will be an HTTP(S) URL endpoint, which the tusd binary will send POST requests to:
209+
HTTP(S) Hooks are the second type of hooks supported by tusd. It is disabled by default. To enable it, pass the `-hooks-http` option to the tusd binary. The flag's value will be an HTTP(S) URL endpoint, which the tusd binary will send POST requests to:
210210

211211
```bash
212-
$ tusd --hooks-http http://localhost:8081/write
212+
$ tusd -hooks-http http://localhost:8081/write
213213

214214
[tusd] Using 'http://localhost:8081/write' as the endpoint for hooks
215215
[tusd] Using './data' as directory storage.
@@ -234,19 +234,19 @@ An example is available at [/examples/hooks/http](/examples/hooks/http).
234234

235235
#### Retries
236236

237-
Tusd uses the [Pester library](https://github.com/sethgrid/pester) to issue requests and handle retries. By default, tusd will retry 3 times on a `500 Internal Server Error` response or network error, with a 1 second backoff. This can be configured with the flags `--hooks-http-retry` and `--hooks-http-backoff`, like so:
237+
Tusd uses the [Pester library](https://github.com/sethgrid/pester) to issue requests and handle retries. By default, tusd will retry 3 times on a `500 Internal Server Error` response or network error, with a 1 second backoff. This can be configured with the flags `-hooks-http-retry` and `-hooks-http-backoff`, like so:
238238

239239
```bash
240240
# Retrying 5 times with a 2 second backoff
241-
$ tusd --hooks-http http://localhost:8081/write --hooks-http-retry 5 --hooks-http-backoff 2
241+
$ tusd -hooks-http http://localhost:8081/write -hooks-http-retry 5 -hooks-http-backoff 2
242242
```
243243

244244
### gRPC Hooks
245245

246-
gRPC Hooks are the third type of hooks supported by tusd. It is disabled by default. To enable it, pass the `--hooks-grpc` option to the tusd binary. The flag's value will be a gRPC endpoint, whose service will be used:
246+
gRPC Hooks are the third type of hooks supported by tusd. It is disabled by default. To enable it, pass the `-hooks-grpc` option to the tusd binary. The flag's value will be a gRPC endpoint, whose service will be used:
247247

248248
```bash
249-
$ tusd --hooks-grpc localhost:8081
249+
$ tusd -hooks-grpc localhost:8081
250250

251251
[tusd] Using 'localhost:8081' as the endpoint for gRPC hooks
252252
[tusd] Using './data' as directory storage.
@@ -257,11 +257,11 @@ The endpoint must implement the hook handler service as specified in [/pkg/hooks
257257

258258
#### Retries
259259

260-
By default, tusd will retry 3 times based on the gRPC status response or network error, with a 1 second backoff. This can be configured with the flags `--hooks-grpc-retry` and `--hooks-grpc-backoff`, like so:
260+
By default, tusd will retry 3 times based on the gRPC status response or network error, with a 1 second backoff. This can be configured with the flags `-hooks-grpc-retry` and `-hooks-grpc-backoff`, like so:
261261

262262
```bash
263263
# Retrying 5 times with a 2 second backoff
264-
$ tusd --hooks-grpc localhost:8081/ --hooks-grpc-retry 5 --hooks-grpc-backoff 2
264+
$ tusd -hooks-grpc localhost:8081/ -hooks-grpc-retry 5 -hooks-grpc-backoff 2
265265
```
266266

267267
### Plugin Hooks

0 commit comments

Comments
 (0)