Skip to content

Conversation

@pablorfb-meta
Copy link
Contributor

Summary: Adds label names to Channel instantiation

Reviewed By: thedavekwon

Differential Revision: D85076897

Summary:

Add optional string labels to both `ChannelAddr` and `ChannelTransport` enum types to enable user-friendly identification and debugging of channels.

### Changes to ChannelAddr

Converted all `ChannelAddr` variants from tuple-style to struct-style with named fields and added an optional `label: Option<String>` field to each variant (local, sim, meta_tls).

Added helper methods:

*   `any_with_label(transport, label: String) -> Self` - Sets a label on an existing address
*   `label() -> Option<&str>` - Returns the label if present

Updated `Display` implementation to show labels in brackets when present:

*   Without label: `tcp:127.0.0.1:8080`
*   With label: `tcp:127.0.0.1:8080[my-service]`


Follow up is to tag channel usage

TODO:
Assign values to labels

Reviewed By: thedavekwon

Differential Revision: D84656187
Summary: Adds label names to Channel instantiation

Reviewed By: thedavekwon

Differential Revision: D85076897
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 20, 2025
@meta-codesync
Copy link

meta-codesync bot commented Oct 20, 2025

@pablorfb-meta has exported this pull request. If you are a Meta employee, you can view the originating Diff in D85076897.

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 meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant