You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by astitcher <gi...@git.apache.org> on 2016/10/11 20:43:26 UTC

[GitHub] qpid-proton pull request #83: [Go binding] Replaced c handler based flowcont...

GitHub user astitcher opened a pull request:

    https://github.com/apache/qpid-proton/pull/83

    [Go binding] Replaced c handler based flowcontroller with native go

    - The go binding now has no dependency on the proton-c reactor code
    
    @alanconway - could you take a look at this an tell me what you think.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/astitcher/qpid-proton go-flowcontroller

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/qpid-proton/pull/83.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #83
    
----
commit ae1ee66ad46512acffae710f8d6f2d4126fc7d2c
Author: Andrew Stitcher <as...@apache.org>
Date:   2016-10-10T19:31:25Z

    [Go binding] Replaced c handler based flowcontroller with native go
    - The go binding now has no dependency on the proton-c reactor code

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] qpid-proton issue #83: [Go binding] Replaced c handler based flowcontroller ...

Posted by alanconway <gi...@git.apache.org>.
Github user alanconway commented on the issue:

    https://github.com/apache/qpid-proton/pull/83
  
    Add module tests to proton_test.go. As you can see right now it is empty which is not ideal (!) The actual tests are in electron/electron_tests.go and the examples are also auto-tested by ctest. We should really have unit tests for proton itself though so if you want to start that off, please do :)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] qpid-proton pull request #83: [Go binding] Replaced c handler based flowcont...

Posted by astitcher <gi...@git.apache.org>.
Github user astitcher closed the pull request at:

    https://github.com/apache/qpid-proton/pull/83


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] qpid-proton issue #83: [Go binding] Replaced c handler based flowcontroller ...

Posted by astitcher <gi...@git.apache.org>.
Github user astitcher commented on the issue:

    https://github.com/apache/qpid-proton/pull/83
  
    @alanconway Thanks for pointing out the stupid Cism in my go code.
    
    I've fixed it now.
    
    I'd much porefer to check this iin with sone sort of test - any clue how I should go about that?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[GitHub] qpid-proton pull request #83: [Go binding] Replaced c handler based flowcont...

Posted by alanconway <gi...@git.apache.org>.
Github user alanconway commented on a diff in the pull request:

    https://github.com/apache/qpid-proton/pull/83#discussion_r83019429
  
    --- Diff: proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go ---
    @@ -308,7 +316,7 @@ func (d *MessagingAdapter) HandleEvent(e Event) {
     			d,
     		}
     		if d.Prefetch > 0 {
    -			d.flowcontroller = cHandler{C.pn_flowcontroller(C.int(d.Prefetch))}
    +			d.flowcontroller = flowcontroller{ window:d.Prefetch, drained:0 }
    --- End diff --
    
    Go cases do not fall through by default so your first 3 cases do nothing. I think you mean:
    
    switch e.Type() {
    case ELinkLocalOpen, ELinkRemoteOpen, ELinkFlow, Edelivery: ...
    
    Otherwise it is  a thing of beauty, should have done this ages ago. :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org