Skip to content

feat: HTTP transport with KasFloodDelay gating and 5xx retry - #27

Merged
chmmou merged 1 commit into
mainfrom
feature/transport
May 3, 2026
Merged

feat: HTTP transport with KasFloodDelay gating and 5xx retry#27
chmmou merged 1 commit into
mainfrom
feature/transport

Conversation

@chmmou

@chmmou chmmou commented May 3, 2026

Copy link
Copy Markdown
Owner

Adds internal/transport.Client: HTTP POST against the KAS endpoint with a versioned User-Agent, exponential backoff on 5xx and network errors, and a per-client gate that honours the server-side KasFloodDelay. Callers feed the delay back via RecordDelay after parsing each response. Now/Sleep are injectable so all retry and gate behaviour is asserted via httptest.Server without real-clock waits.

Closes #4.

Add internal/transport.Client for posting SOAP envelopes to a KAS
endpoint:

- HTTP POST with text/xml; charset=utf-8 and a version-stamped
  User-Agent.
- Exponential backoff on 5xx and network errors, MaxRetries
  configurable; 4xx and SOAP-level faults are surfaced without
  retry.
- Per-instance gate consulted before each request: callers report the
  delay returned by the server via RecordDelay so successive Do calls
  honour the KAS-side rate limit.
- Now and Sleep are injectable so retry timing and gate behaviour
  are asserted via httptest.Server without real-clock waits.

Closes #4.
@chmmou
chmmou merged commit ec8a831 into main May 3, 2026
1 check passed
@chmmou
chmmou deleted the feature/transport branch May 3, 2026 11:47
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.

SOAP transport: HTTP client + KasFloodDelay enforcement

1 participant