func IsMaxRetriesReached(err error) bool {
	return errgo.Cause(err) == MaxRetriesReachedError
}
IsMaxRetriesReached returns true if the cause of the given error is a MaxRetriesReachedError.
package retry
import (
	"github.com/juju/errgo"
)
var (
	TimeoutError           = errgo.New("Operation aborted. Timeout occured")
	MaxRetriesReachedError = errgo.New("Operation aborted. Too many errors.")
)
func IsTimeout(err error) bool {
	return errgo.Cause(err) == TimeoutError
}