Commit 530bc4c
committed
Use common function for service policy boilerplate
We would like to use the Cockatiel library in our service classes to
ensure that requests are retried using the circuit breaker pattern. Some
of our service classes do this already, but we are copying and pasting
the code around. This commit extracts the boilerplate code to a new
function in the `@metamask/controller-utils` package,
`createServicePolicy`, so that we no longer have to do this.1 parent 7c38c24 commit 530bc4c
File tree
7 files changed
+2968
-0
lines changed- packages/controller-utils
- src
7 files changed
+2968
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
0 commit comments