modifiable channel pipelines
authorJames Sedgwick <jsedgwick@fb.com>
Fri, 21 Nov 2014 19:30:14 +0000 (11:30 -0800)
committerDave Watson <davejwatson@fb.com>
Thu, 11 Dec 2014 15:58:31 +0000 (07:58 -0800)
commit4092355936775450e253d57b7f8a90c734b00cb3
treed6cf0bcbd0791ba805a939c4c77ec4c3422188a6
parent8a5fcb4f368ca65e0e55ee6efa530403a0903adf
modifiable channel pipelines

Summary:
Basically the same interface as before, but you must specify the read and write types for the ends of pipeline. Implementation is cleaner as well; there's fewer levels of indirection

This dynamic casts shit all over the place and is less typesafe then the previous iteration, but I think with some carefully placed static_asserts, could be just as safe (in the case where you don't do any modification, anyway)

Right now you can only add to the front or back of the pipeline but the way it's set up you could add any number of mutations, including ones that are triggered by handlers. But this should (might?) be enough for Tunnel, which was the motivation.

Test Plan: basic test compiles, thrift2 diff still works with a one line change

Reviewed By: hans@fb.com

Subscribers: trunkagent, fugalh, njormrod, folly-diffs@, bmatheny

FB internal diff: D1661169

Tasks: 5002299

Signature: t1:1661169:1416521727:1f126279796c0b09d1905b9f7dbc48a9e5540271
folly/experimental/wangle/channel/ChannelHandler.h
folly/experimental/wangle/channel/ChannelHandlerContext.h [new file with mode: 0644]
folly/experimental/wangle/channel/ChannelPipeline.h
folly/experimental/wangle/channel/ChannelTest.cpp