Skip to content

refactor(tui): Forward load_balancer to gen ResourceBehaviour - #1978

Merged
gtema merged 1 commit into
mainfrom
tui-thin-load-balancer
Sep 3, 2026
Merged

refactor(tui): Forward load_balancer to gen ResourceBehaviour#1978
gtema merged 1 commit into
mainfrom
tui-thin-load-balancer

Conversation

@gtema

@gtema gtema commented Sep 3, 2026

Copy link
Copy Markdown
Owner

PR #1975 added the generated mechanical tier for the load_balancer
resources but left the hand-written ResourceBehaviour impls writing the
six derivable methods inline. Thin each hand file to a one-line forwarder
onto super::generated::<r>::Generated::<method>, keeping only the
genuinely custom logic:

  • loadbalancers.rs: dual filter_carry_action drilldown into listeners
    and pools, plus the two TryFrom<&serde_json::Value> filter builders.
  • pools.rs: dual filter_carry_action drilldown into members and
    health monitors, plus its two TryFrom filter builders.
  • listeners.rs / health_monitors.rs: pure forwarders.

pool_members.rs is a nested resource the generator does not emit and is
left untouched. Test title expectations move to the generator's
prefix-stripped form ("Load Balancers", "Pools").

Assisted-By: Claude Sonnet 5 noreply@anthropic.com
Signed-off-by: Artem Goncharov artem.goncharov@gmail.com

PR #1975 added the generated mechanical tier for the load_balancer
resources but left the hand-written `ResourceBehaviour` impls writing the
six derivable methods inline. Thin each hand file to a one-line forwarder
onto `super::generated::<r>::Generated::<method>`, keeping only the
genuinely custom logic:

- `loadbalancers.rs`: dual `filter_carry_action` drilldown into listeners
  and pools, plus the two `TryFrom<&serde_json::Value>` filter builders.
- `pools.rs`: dual `filter_carry_action` drilldown into members and
  health monitors, plus its two `TryFrom` filter builders.
- `listeners.rs` / `health_monitors.rs`: pure forwarders.

`pool_members.rs` is a nested resource the generator does not emit and is
left untouched. Test title expectations move to the generator's
prefix-stripped form ("Load Balancers", "Pools").

Assisted-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
@gtema
gtema merged commit de17bde into main Sep 3, 2026
18 checks passed
@gtema-release-plz gtema-release-plz Bot mentioned this pull request Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant