Open Raynos opened 9 years ago
cc @jcorbin @rf @kriskowal ^
cc @Jeloi for the initial idea :)
sgtm
I like it, but how about getThriftService
? codec
is really generic
Maybe getThriftChannel. What you’re getting has the shape of a channel. Code/Decode is the same as Read/Write and you’re not getting a ThriftRW.
Is this the best way to hide sub-channels? Should we hide sub-channels? The way to hide sub-channels is to present SubChannel as the Channel constructor folks use, which in turn constructs the topChannel on your behalf.
This suggestion is not really about "hiding sub channels". The sub channel implementation detail is just hidden from the user with this method.
This method is all about simplifying the step from "I have a hyperbahn client" to "I make a thrift RPC call".
The idea is to hide the sub channel behind the thrift codec interface so that people dont have to know about sub channels.
This allows application developers to make requests like: