()
| 784 | } |
| 785 | |
| 786 | func (w *Writer) maxAttempts() int { |
| 787 | if w.MaxAttempts > 0 { |
| 788 | return w.MaxAttempts |
| 789 | } |
| 790 | // TODO: this is a very high default, if something has failed 9 times it |
| 791 | // seems unlikely it will succeed on the 10th attempt. However, it does |
| 792 | // carry the risk to greatly increase the volume of requests sent to the |
| 793 | // kafka cluster. We should consider reducing this default (3?). |
| 794 | return 10 |
| 795 | } |
| 796 | |
| 797 | func (w *Writer) writeBackoffMin() time.Duration { |
| 798 | if w.WriteBackoffMin > 0 { |
no outgoing calls
no test coverage detected