[P2][refactor] api::handle_request()를 router/handler/middleware 구조로 분리 #35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
문제
crates/portal-relay/src/api/mod.rs의handle_request()가 routing, JSON decoding, auth precondition, lease/discovery/hop operation, logging decision, error response까지 많은 책임을 가집니다.영향
제안 구조
장기적으로 Hyper/Tower와 결합하면 middleware 구조가 자연스러워집니다.
완료 기준
검토 기준: 업로드된 Rust
portal-relay코드 정적 리뷰. 리뷰 환경에서는cargo check/test/clippy를 실행하지 못했습니다.검토했지만 이번 범위에서는 수용하지 않습니다. router/handler/middleware 분리는 방향성은 타당하지만 현재 이슈는 구체적 결함보다 대형 구조 변경이며, Go v2.1.9 relay compatibility를 안정화하는 현재 프로젝트 범위에서는 회귀 위험이 더 큽니다. 필요한 보안 누락은 PR #62에서 직접 보강했으므로 이 리팩터링 이슈는 닫습니다.