(ctx context.Context, delay time.Duration)
| 309 | } |
| 310 | |
| 311 | func waitDocsImageInsertRetry(ctx context.Context, delay time.Duration) error { |
| 312 | if delay <= 0 { |
| 313 | return nil |
| 314 | } |
| 315 | timer := time.NewTimer(delay) |
| 316 | defer timer.Stop() |
| 317 | select { |
| 318 | case <-ctx.Done(): |
| 319 | return ctx.Err() |
| 320 | case <-timer.C: |
| 321 | return nil |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | func isRetryableDocsImageInsertError(err error) bool { |
| 326 | var apiErr *gapi.Error |
no test coverage detected