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
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Description
4
4
5
-
`failure-cloudfunctions` is a small Node module for injecting failure into Google Cloud Functions (https://cloud.google.com/functions/). It offers a simple failure injection wrapper for your Cloud Functions handler where you then can choose to inject failure by setting the `failureMode` to `latency`, `exception`, `blacklist`, `diskspace` or `statuscode`. You control your failure injection using a secret in Secret Manager.
5
+
`failure-cloudfunctions` is a small Node module for injecting failure into Google Cloud Functions (https://cloud.google.com/functions/). It offers a simple failure injection wrapper for your Cloud Functions handler where you then can choose to inject failure by setting the `failureMode` to `latency`, `exception`, `denylist`, `diskspace` or `statuscode`. You control your failure injection using a secret in Secret Manager.
5. Add environment variables to your Cloud Function with values from above.
32
32
```bash
@@ -45,13 +45,13 @@ Edit the values of your parameter in Secret Manager to use the failure injection
45
45
46
46
*`isEnabled: true` means that failure is injected into your Cloud Function.
47
47
*`isEnabled: false` means that the failure injection module is disabled and no failure is injected.
48
-
*`failureMode` selects which failure you want to inject. The options are `latency`, `exception`, `blacklist`, `diskspace` or `statuscode` as explained below.
48
+
*`failureMode` selects which failure you want to inject. The options are `latency`, `exception`, `denylist`, `diskspace` or `statuscode` as explained below.
49
49
*`rate` controls the rate of failure. 1 means that failure is injected on all invocations and 0.5 that failure is injected on about half of all invocations.
50
50
*`minLatency` and `maxLatency` is the span of latency in milliseconds injected into your function when `failureMode` is set to `latency`.
51
51
*`exceptionMsg` is the message thrown with the exception created when `failureMode` is set to `exception`.
52
52
*`statusCode` is the status code returned by your function when `failureMode` is set to `statuscode`.
53
53
*`diskSpace` is size in MB of the file created in tmp when `failureMode` is set to `diskspace`.
54
-
*`blacklist` is an array of regular expressions, if a connection is made to a host matching one of the regular expressions it will be blocked.
54
+
*`denylist` is an array of regular expressions, if a connection is made to a host matching one of the regular expressions it will be blocked.
55
55
56
56
## Example
57
57
@@ -63,6 +63,12 @@ Inspired by Yan Cui's articles on latency injection for Google Cloud Functions (
63
63
64
64
## Changelog
65
65
66
+
### 2020-08-24 v0.3.0
67
+
68
+
* Changed mitm mode from connect to connection for quicker enable/disable of failure injection.
69
+
* Renamed block list failure injection to denylist (breaking change for that failure mode).
0 commit comments