Skip to content

grpc: make LbPolicyBuilder/LbPolicy generic and introduce Dyn wrappers#2557

Open
dfawley wants to merge 1 commit intohyperium:masterfrom
dfawley:dyn_builder
Open

grpc: make LbPolicyBuilder/LbPolicy generic and introduce Dyn wrappers#2557
dfawley wants to merge 1 commit intohyperium:masterfrom
dfawley:dyn_builder

Conversation

@dfawley
Copy link
Collaborator

@dfawley dfawley commented Mar 18, 2026

This will enable us to make typed LB policies where there is potentially a tree of known types involved, including use cases like:

  • xDS, which has several stacked LB policies that are always the same
  • Lazy LB policy, which has a child which can be usefully typed

Also:

  • Simplify error return types from LB policies to String
  • Replace LbConfig struct with a DynLbConfig type alias to Arc
  • Move subchannel definitions to a submodule to declutter load_balancing/mod.rs
  • Rearrange load_balancing/mod.rs a little for readability

@dfawley dfawley added this to the grpc-next milestone Mar 18, 2026
@dfawley dfawley requested a review from arjan-bal March 18, 2026 16:26
This will enable us to make typed LB policies where there is potentially a tree
of known types involved, including use cases like:

- xDS, which has several stacked LB policies that are always the same
- Lazy LB policy, which has a child which can be usefully typed

Also:

- Simplify error return types from LB policies to String
- Replace LbConfig struct with a DynLbConfig type alias to Arc<dyn Any...>
- Move subchannel definitions to a submodule to declutter load_balancing/mod.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants