[WIP] Envoy Internal connection strawman#12537
[WIP] Envoy Internal connection strawman#12537lambdai wants to merge 38 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
write return close only when eos and buffer empty. write won't set end of stream. Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
| : BaseListenerImpl(dispatcher, std::move(socket)), cb_(cb), listener_(nullptr) { | ||
| if (bind_to_port) { | ||
| setupServerSocket(dispatcher, *socket_); | ||
| setupPipeListener(dispatcher, name); |
There was a problem hiding this comment.
@mattklein123
I registered each listener as internal connectable. This will lead to failure in the follow up.
I incline to create a new InternalListener type so that I can bootstrap the new type of listener,
adding very limited feature at the early phase.
WDYT?
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
For half close Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]> add missing pipe file Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
alyssawilk
left a comment
There was a problem hiding this comment.
This is going to be epic once it lands.
To respond to your questions (with a few glances at code)
"Address.
A new type of address, or specialize the ip/pipe?"
given they're const I'd be inclined to pass through the original listener, whatever we are demuxing from, at least for first pass.
"Listener.
Do we want to reuse the TcpListener with restrictions since not all tcp can be implemented
O"
Examples of what can't be implemented please?
| TransportSocketCallbacks* callbacks_{}; | ||
| bool shutdown_{}; | ||
| Buffer::WatermarkBuffer read_buffer_; | ||
| bool read_end_stream_{false}; |
There was a problem hiding this comment.
Completely drop this transport socket implementation and moved to lower level IoHandle implementation.
| } | ||
| } | ||
|
|
||
| ClientPipeImpl::ClientPipeImpl(Event::Dispatcher& dispatcher, |
There was a problem hiding this comment.
Please break this into its own file.
There was a problem hiding this comment.
ClientPipeImpl is now deleted
Instead of introducing ClientPipeImpl and ServerPipeImpl, ConnectionImpl now could use new buffer source io handle.
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
Signed-off-by: Yuchen Dai <[email protected]>
|
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Commit Message:
Prototype of #11725
The internal connection implementation is a toy.
But we we may want to discuss the
Envoy Internal address type is introduced in api: add envoy internal address #12837
A new type of address, or specialize the ip/pipe?I strongly believe we should introduce a new field
internal_listenerin messageListener. Similar toApi ListenerWe can add new internal-specific settings into this type of struct.
Implementations
This is an socket handle which owns a buffer. Think the buffer as the socket buffer in the kernel. This handle should be always created with a peer so that this handle could write to peer's buffer, and notify readable or writable signal along with read/write/shutdown.
Allow register internal listener and target listener when a client connection need to be created
Register internal listener by name and "accept" connection. Currently internal listener could simulate tcp listener but not udp listener.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]