[ 
https://issues.apache.org/jira/browse/THRIFT-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16192757#comment-16192757
 ] 

ASF GitHub Bot commented on THRIFT-4285:
----------------------------------------

Github user dcelasun commented on the issue:

    https://github.com/apache/thrift/pull/1382
  
    @jeking3 All tests green. I've reverted all the Go version changes and made 
the tests compatible with Go 1.4.
    
    I've also tested Thrift from this branch (both compiler and lib) with a 
large, real project and everything works fine. Here's what I had to change:
    
    IDL:
    ```thrift
    package mypkg
    
    service Foo {}
    ```
    
    Old code:
    ```go
    client := mypkg.NewFooClientFactory(transport, protocolFactory)
    ```
    
    New code:
    ```go
    protocol := protocolFactory.GetProtocol(transport)
    client := mypkg.NewFooClient(thrift.NewTStandardClient(p, p))
    ```
    
    That's it. There are other BC breaks on `master`, but this is the only 
change needed for this patch.
    
    If you are happy with it as well, I can squash and rebase from master.


> Pull generated send/recv into library to allow behaviour to be customised
> -------------------------------------------------------------------------
>
>                 Key: THRIFT-4285
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4285
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Go - Compiler, Go - Library
>            Reporter: Chris Bannister
>            Assignee: Chris Bannister
>         Attachments: 0001-go-pull-generated-send-recv-into-lib-v6.patch, 
> 0001-go-pull-generated-send-recv-into-lib-v7.patch
>
>
> Currently it is difficult to change how thrift writes messages onto the 
> transport because they are in the generated code. Instead the generated 
> send/recv methods should be in the library. This will greatly simplify the 
> client code and remove many duplicate methods whilst allowing users more 
> flexibility to implement connection pools and other features such as THeader.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to