Skip to content

[#59] Nexa 1.3 재시도 builder API와 interceptor method 불변 계약을 구성한다 - #60

Merged
opficdev merged 6 commits into
developfrom
fix/#59
Aug 23, 2026
Merged

opficdev merged 6 commits into
developfrom
fix/#59

Conversation

@opficdev

@opficdev opficdev commented Aug 23, 2026

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

📝 작업 내용

📌 요약

  • Sources/Nexa, Tests/NexaTests, Examples/NexaClient/NexaClient 평탄화
  • 공개 NXRetryPolicy 구성 경로 제거 및 매개변수 기반 .retry(...) 제공
  • NXRetryPolicy 내부 구현과 RequestSpec.retryPolicy 연결 유지
  • .retry()maxAttempts 기본값 3 제공
  • interceptor의 HTTP method 변경 차단
  • README, README.ko, DocC 전환 안내 갱신

🔍 상세

  • 공개 builder: NXRetryBackoff, NXRetryJitter와 매개변수 기반 .retry(...) 제공
  • 내부 정책: RequestSpec.retryPolicyNXRetryInterceptor에서 NXRetryPolicy 유지
  • method 계약: GET → POST, GET → PATCH, POST → GET 변경 시 transport 이전 NXError.invalidRequest 종료
  • 실행 순서: retry → auth → global interceptor → request interceptor → logger → cache → transport 유지

📸 영상 / 이미지 (Optional)

flowchart LR
    client["NXAPIClient"] --> builder["NXRequestBuilder"]

    builder -. 기존 .-> oldRetry[".retry(_:)"]
    oldRetry -. 기존 .-> oldPolicy["공개 NXRetryPolicy<br/>init · Backoff · Jitter"]
    oldPolicy -. 기존 .-> spec["RequestSpec"]

    builder --> parameters[".retry()<br/>maxAttempts 기본값 3"]
    parameters --> policy["내부 NXRetryPolicy"]
    policy --> spec

    spec -. 기존: guard 없음 .-> interceptors["interceptors<br/>retry → auth → global → request → logger → cache"]
    spec --> proceed["proceed<br/>method guard"]
    proceed -->|다음 interceptor| interceptors
    interceptors -->|next 전달| proceed
    proceed -->|마지막 interceptor 이후| transport["transport"]
    proceed -->|method 불일치| invalid["NXError.invalidRequest"]
Loading

@opficdev opficdev self-assigned this Aug 23, 2026
@opficdev
opficdev merged commit bd800d4 into develop Aug 23, 2026
4 checks passed
@opficdev
opficdev deleted the fix/#59 branch August 23, 2026 05:04
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.

Nexa 1.3 재시도 builder API와 interceptor method 불변 계약을 구성한다

1 participant