A high-performance CEP lookup solution using Go concurrency patterns, implementing parallel processing and timeout handling.
This project demonstrates practical multithreading implementation in Go for optimized address lookup via ZIP code. The system performs simultaneous queries to two different public APIs, returning the fastest valid response while efficiently managing timeouts and errors.
- Parallel API Queries: Concurrent requests to BrasilAPI and ViaCEP
- Fail-Fast Strategy: Returns the first valid response received
- Controlled Timeout: 1-second response time limit
- Error Resilience: Individual error handling per API
- Structured Output: Clear result display with source identification
- Run with a valid 8-digit ZIP code:
go run cmd/fullcyclelab/main.go [ZIP_CODE]