type RetryError … // NewRetryError returns a RetryError. func NewRetryError(msg string, retryAfter time.Duration) *RetryError { … } // Error shows the details of the retry reason. func (re *RetryError) Error() string { … } // RetryAfter returns the defined retry-after duration. func (re *RetryError) RetryAfter() time.Duration { … }