Merge lp://staging/~free.ekanayaka/txamqp/amq-endpoint into lp://staging/txamqp

Proposed by Free Ekanayaka
Status: Merged
Merged at revision: 73
Proposed branch: lp://staging/~free.ekanayaka/txamqp/amq-endpoint
Merge into: lp://staging/txamqp
Diff against target: 364 lines (+345/-0)
4 files modified
src/txamqp/endpoint.py (+130/-0)
src/txamqp/factory.py (+61/-0)
src/txamqp/test/test_endpoint.py (+103/-0)
src/txamqp/test/test_factory.py (+51/-0)
To merge this branch: bzr merge lp://staging/~free.ekanayaka/txamqp/amq-endpoint
Reviewer Review Type Date Requested Status
Esteve Fernandez Approve
Review via email: mp+295952@code.staging.launchpad.net

Description of the change

This branch adds an AMQEndpoint class which has the same interface as a regular IStreamClientEndpoint, but with some more assumptions about the factory being passed and the transport to be used.

Example code:

from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks
from txamqp.factory import AMQFactory
from txamqp.endpoint import AMQEndpoint

@inlineCallbacks
def connect():
    endpoint = AMQEndpoint.fromURI(reactor, "amqp://guest@:guest@localhost/")
    client = yield endpoint.connect(AMQFactory())
    # ... "client" is a connected and authenticated AMQClient

For now no support for TLS connections is in place, but it'd be easy
to add as follow-up branch, if there's desire for it.

To post a comment you must log in.
Revision history for this message
Esteve Fernandez (esteve) wrote :

Thanks, changes look great!

review: Approve
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Thanks for the very quick feedback Esteve!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: