mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 11:30:15 +00:00
Implements comprehensive client-side improvements for production reliability:
1. Context Support with Deadlines:
- Added callWithContext() for context-aware RPC calls
- Respects context deadlines and cancellation
- Prevents goroutine pileup under network issues
2. Exponential Backoff with Jitter:
- Automatic retry with exponential backoff (100ms → 10s)
- ±10% jitter to prevent thundering herd
- Max 3 retries for transient failures
- Smart retry decision based on error classification
3. Error Classification:
- ProxyError type with classification (Transport, Auth, SSH, Sensor, Timeout)
- Retryable vs non-retryable error identification
- Better error messages for debugging
- Structured error handling throughout
4. Improved Connection Handling:
- DialContext for cancellable connections
- Proper deadline propagation
- Clean separation of single-attempt vs retry logic
- Legacy call() method preserved for backwards compatibility
Security Notes:
- SSH fallback already blocked in containers (temperature.go:69-77)
- Per-client token auth not needed after method-level authz (commit
|
||
|---|---|---|
| .. | ||
| client.go | ||