func ToRetryCount(err error) *retryErr {
	if retryErr, ok := err.(*retryErr); ok {
		return retryErr
	}
	return nil
}
ToRetryCount is a helper function for testing verification to avoid whitebox testing
as well as keeping retryErr as a private.
Should NOT be used under any other context.
package realis
type timeout interface {
	Timedout() bool
}
func IsTimeout(err error) bool {
	temp, ok := err.(timeout)
	return ok && temp.Timedout()
}
type timeoutErr struct {
	error
	timedout bool
}
func (r *timeoutErr) Timedout() bool {
	return r.timedout
}
func newTimedoutError(err error) *timeoutErr {
	return &timeoutErr{error: err, timedout: true}
}
type retryErr struct {
	error
	timedout   bool
	retryCount int  
}
func (r *retryErr) Timedout() bool {
	return r.timedout
}
func (r *retryErr) RetryCount() int {
	return r.retryCount
}