We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34ee4aa commit 3f330b7Copy full SHA for 3f330b7
1 file changed
README.md
@@ -203,6 +203,31 @@ if err != nil {
203
}
204
```
205
206
+### Restarting Players
207
+
208
+A player can be configured to restart, possibly with exponential backoff by implementing the `PlayerWithBackoff` interface.
209
210
+For example:
211
212
+```go
213
+package main
214
215
+import "github.com/cenkalti/backoff/v4"
216
217
+type playerThatRestartsImmediately struct{}
218
219
+func (playerThatRestartsImmediately) Backoff() backoff.BackOff {
220
+ return &backoff.ZeroBackOff{}
221
+}
222
223
224
+type playerWithExponentialBakoff struct{}
225
226
+func (playerWithExponentialBakoff) Backoff() backoff.BackOff {
227
+ return backoff.NewExponentialBackOff()
228
229
+```
230
231
## Customization
232
233
The logger can be modified by assigning a logger to `orchestra.Logger`
0 commit comments