How gurizzu/go-reqws works
go-reqws is a Go client library for making configurable HTTP requests and maintaining channel-based WebSocket streams. Its main workflow is: a caller configures a client and request options, invokes an HTTP method that executes the request (optionally with retries and hooks), then inspects a response or error. A separate WebSocket workflow supports streaming and optional reconnection. The excerpts show the retry and WebSocket control flow; some HTTP pipeline details and documented capabilities are represented at the level supported by the README.
Main entry points: requests.go HTTP methods · ws.go WebSocket stream · retry.go Retry policy · errors.go Typed errors
Components 12
HTTP requests
- Client setup
requests.go - Request options
requests.go - HTTP methods
requests.go - HTTP execution
requests.go - Response helpers
requests.go
Resilience and hooks
- Retry policy
retry.go - Request hooks
middleware.go
WebSocket streaming
- WebSocket stream
ws.go - Reconnect policy
ws.go
Error handling
- Typed errors
errors.go
Other components
- Library caller
- HTTP service
Connections 13
- Library caller → Client setup: creates
README.md - Library caller → Request options: configures
README.md - Library caller → HTTP methods: invokes
README.md - HTTP methods → Retry policy: executes through
requests.go - Retry policy → HTTP execution: calls
retry.go - HTTP execution → HTTP service: sends request
- HTTP methods → Response helpers: returns
README.md - Request hooks → HTTP execution: hooks pipeline
README.md - Library caller → WebSocket stream: starts stream
README.md - Reconnect policy → WebSocket stream: retries stream
ws.go - Library caller → Reconnect policy: configures
README.md - HTTP methods → Typed errors: reports HTTP errors
README.md - WebSocket stream → Typed errors: reports stream errors
ws.go