| 24 | namespace { |
| 25 | |
| 26 | bool IsRetriable(error::Code code) { |
| 27 | switch (code) { |
| 28 | case error::UNAVAILABLE: |
| 29 | case error::DEADLINE_EXCEEDED: |
| 30 | case error::UNKNOWN: |
| 31 | return true; |
| 32 | default: |
| 33 | // OK also falls here. |
| 34 | return false; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | } // namespace |
| 39 |