Logo
Explore Help
Sign In
go/httpclient
1
0
Fork 0
You've already forked httpclient
Code Issues Pull Requests Packages Releases 1 Activity
Files
v0.9.0
httpclient/go.mod

11 lines
209 B
Modula-2
Raw Permalink Normal View History

feat(httpclient): initial stable release v0.9.0 Resilient HTTP client with circuit breaking, exponential-backoff retry, X-Request-ID propagation, and a generic typed JSON helper. What's included: - Client interface with Do(req) method; New(logger, cfg) and NewWithDefaults(logger) constructors - Config struct with env-tag support for timeout, dial timeout, retry, and circuit breaker parameters - Retry via avast/retry-go/v4 with BackOffDelay; triggers only on network errors and HTTP 5xx - Circuit breaker via sony/gobreaker wrapping the full retry loop; open circuit → xerrors.ErrUnavailable - X-Request-ID header propagated automatically from context via logz.GetRequestID on every attempt - DoJSON[T](ctx, client, req) generic helper for typed JSON request/response with xerrors error mapping - MapStatusToError(code, msg) exported function mapping HTTP status codes to xerrors types Tested-via: todo-api POC integration Reviewed-against: docs/adr/
2026-03-19 13:04:37 +00:00
module code.nochebuena.dev/go/httpclient
go 1.25
require (
code.nochebuena.dev/go/logz v0.9.0
code.nochebuena.dev/go/xerrors v0.9.0
github.com/avast/retry-go/v4 v4.3.4
github.com/sony/gobreaker v1.0.0
)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 18ms Template: 1ms
English
English
Licenses API