
we can just look up until the first ':'; we just need to define a new interface for a new syntax.
What do you think of adding a special argument for endpoint strings called "wraps" or "pipe" that tells the parser to recombine the right-hand side and send it back through the parser? For example: haproxy:*pipe=* ssl:port=443:privateKey=/etc/ssl/server.pem:extraCertChain=/etc/ssl/chain.pem:sslmethod=SSLv3_METHOD:dhParameters=dh_param_1024.pem: *pipe=*tcp:7.6.5.4:443:*pipe=*unix:path=/var/run/web.sock I believe this would fit as a backwards compatible change to the syntax and would also position us to add composition support to the existing endpoints in backwards compatible ways. As endpoints gain composition support, existing users can opt-in by adding the new argument to existing string descriptors. This topic coming back up is timely for me. I was recently talking with a user of the haproxy endpoint wrapper who was hitting an issue with the SSL endpoint not playing well when used in composition. I'll spin off another thread for that topic, but coming up with a syntax for composition is going to be pre-requisite to having true composition support. On Thu, Oct 13, 2016 at 2:26 AM Glyph Lefkowitz <glyph@twistedmatrix.com> wrote:
On Oct 12, 2016, at 7:35 PM, Tom Prince <tom.prince@ualberta.net> wrote:
Thinking about it some more, there isn't currently any endpoint descriptions that have an empty name, so we could have a entirely new syntax that starts with `:`. If we went in that direction, we'd definitely want to think about future extensibility when designing it.
This applies more generally; no need for any weird hacks. Any 'new' plugin could just opt in to a different syntax; we can just look up until the first ':'; we just need to define a new interface for a new syntax.
-glyph _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python