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: docs/hooks.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -175,10 +175,10 @@ With file hooks enabled, tusd will execute scripts or other executable files in
175
175
176
176
#### Hook Directory
177
177
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**:
179
179
180
180
```bash
181
-
$ tusd --hooks-dir ./path/to/hooks/
181
+
$ tusd -hooks-dir ./path/to/hooks/
182
182
183
183
[tusd] Using './path/to/hooks/'for hooks
184
184
[tusd] Using './data' as directory storage.
@@ -206,10 +206,10 @@ An example is available at [/examples/hooks/file](/examples/hooks/file).
206
206
207
207
### HTTP(S) Hooks
208
208
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:
210
210
211
211
```bash
212
-
$ tusd --hooks-http http://localhost:8081/write
212
+
$ tusd -hooks-http http://localhost:8081/write
213
213
214
214
[tusd] Using 'http://localhost:8081/write' as the endpoint for hooks
215
215
[tusd] Using './data' as directory storage.
@@ -234,19 +234,19 @@ An example is available at [/examples/hooks/http](/examples/hooks/http).
234
234
235
235
#### Retries
236
236
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:
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:
247
247
248
248
```bash
249
-
$ tusd --hooks-grpc localhost:8081
249
+
$ tusd -hooks-grpc localhost:8081
250
250
251
251
[tusd] Using 'localhost:8081' as the endpoint for gRPC hooks
252
252
[tusd] Using './data' as directory storage.
@@ -257,11 +257,11 @@ The endpoint must implement the hook handler service as specified in [/pkg/hooks
257
257
258
258
#### Retries
259
259
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:
0 commit comments