Skip to content

[hyperactor] add NetLink enum to unify transport dispatch#2951

Closed
mariusae wants to merge 10 commits intogh/mariusae/265/basefrom
gh/mariusae/265/head
Closed

[hyperactor] add NetLink enum to unify transport dispatch#2951
mariusae wants to merge 10 commits intogh/mariusae/265/basefrom
gh/mariusae/265/head

Conversation

@mariusae
Copy link
Copy Markdown
Member

@mariusae mariusae commented Mar 9, 2026

Stack from ghstack (oldest at bottom):

Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: D95856552

NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!

Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
Introduce NetLink enum wrapping transport-specific link types
(TcpLink, UnixLink, TlsLink) and implementing Link with
Box<dyn Stream> as the stream type. The net::link(addr) constructor
dispatches based on channel address variant.

Call sites become net::spawn(net::link(addr)?) and
duplex::spawn(net::link(addr)?) instead of matching on every
transport. Unify ChannelTxKind's four net variants (Tcp, Unix, Tls,
MetaTls) into a single Net(NetTx<M>).

Stack walkthrough:
https://www.internalfb.com/intern/phabricator/paste/markdown/P2227090563/

Differential Revision: [D95856552](https://our.internmc.facebook.com/intern/diff/D95856552/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D95856552/)!

[ghstack-poisoned]
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 14, 2026

This pull request has been merged in 1242c01.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant