Skip to content

refactor: Encapsulate NetworkTopology#8828

Open
schneiderstefan wants to merge 2 commits intomasterfrom
stschnei/topology-encapsulation
Open

refactor: Encapsulate NetworkTopology#8828
schneiderstefan wants to merge 2 commits intomasterfrom
stschnei/topology-encapsulation

Conversation

@schneiderstefan
Copy link
Contributor

This commit makes NetworkTopology::subnets and
NetworkTopology::routing_table private and provides a public getter as well as a test-only setter and mutable getter.

The goal is to encapsulate these fields with an eye of supporting engines, where depending on the call site engines have to be handled differently. Encapsulation makes it easier to keep an eye on all relevant call sites and decisions wrt engines.

Other fields in the network topology remain public for simplicity. They can be encapsulated in a similar fashion when a need arises.

This commit makes NetworkTopology::subnets and
NetworkTopology::routing_table private and provides a public getter as
well as a test-only setter and mutable getter.

The goal is to encapsulate these fields with an eye of supporting
engines, where depending on the call site engines have to be handled
differently. Encapsulation makes it easier to keep an eye on all
relevant call sites and decisions wrt engines.

Other fields in the network topology remain public for simplicity. They
can be encapsulated in a similar fashion when a need arises.
@schneiderstefan schneiderstefan requested a review from a team as a code owner February 12, 2026 16:31
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.

1 participant