Skip to content

feature: expose last upstream send state to balancer FFI - #4

Open
membphis wants to merge 4 commits into
devfrom
codex/balancer-last-send-state
Open

feature: expose last upstream send state to balancer FFI#4
membphis wants to merge 4 commits into
devfrom
codex/balancer-last-send-state

Conversation

@membphis

Copy link
Copy Markdown
Owner

Summary

  • add a balancer peer snapshot for the previous upstream send state
  • expose ngx_http_lua_ffi_balancer_get_last_send_state() for lua-resty-core
  • add focused FFI coverage for first-attempt, zero-byte retry, and completed-body retry states

Notes

  • Refs 新增 ngx.balancer API 暴露上游重试发送状态 #3
  • Local Test::Nginx execution was skipped as requested; CI is the source of truth for runtime verification.
  • The user-facing ngx.balancer.get_last_send_state() wrapper will be implemented in the paired membphis/lua-resty-core PR.

Verification

  • git diff --check
  • PERL5LIB=/tmp/codex-perl5/lib/perl5 perl -I/tmp/codex-test-nginx/lib -c t/194-balancer-last-send-state.t

@membphis membphis changed the title feat: expose last upstream send state to balancer FFI feature: expose last upstream send state to balancer FFI Jun 21, 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