arbitrary buffered channel size, for readability resumableError returns true if err is only a protocol-level cache error. This is used to determine whether or not a server connection should be re-used or not. If an error occurs, by default we don't reuse the connection, unless it was just a cache er
(err error)
| 80 | // be re-used or not. If an error occurs, by default we don't reuse the |
| 81 | // connection, unless it was just a cache error. |
| 82 | func resumableError(err error) bool { |
| 83 | switch err { |
| 84 | case ErrCacheMiss, ErrCASConflict, ErrNotStored, ErrMalformedKey: |
| 85 | return true |
| 86 | } |
| 87 | return false |
| 88 | } |
| 89 | |
| 90 | func legalKey(key string) bool { |
| 91 | if len(key) > 250 { |
no outgoing calls
no test coverage detected
searching dependent graphs…