Add foundation: middleware type, error types, and internal clock

Introduce the core building blocks for the httpx library:
- middleware.Middleware type and Chain() composer
- Error struct with sentinel errors (ErrRetryExhausted, ErrCircuitOpen, ErrNoHealthy)
- internal/clock package with Clock interface and MockClock for deterministic testing
This commit is contained in:
2026-03-20 14:21:43 +03:00
parent f2a4a4fccc
commit 6b1941fce7
4 changed files with 226 additions and 0 deletions

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module git.codelab.vc/pkg/httpx
go 1.24