A distributed gRPC-based application for locating requested records in log files via a Lambda-backed HTTP API.
Platform: Windows 10
Go Version: 1.19.2
IDE: IntelliJ IDEA Ultimate
This project consists of a gRPC client-server architecture where:
- The gRPC client sends a request with a specific
timeanddeltaTime. - The gRPC server receives the request and queries an AWS API Gateway endpoint.
- The endpoint routes the request to a Lambda function that checks for log records within the specified time range.
- If logs are present, a 200 response is returned with an MD5 hash of the logs.
- If logs are not found, a 400-level response is returned with a "not found" message.
⚠️ Major structural changes implemented:
- Extracted API call logic into a reusable function.
- Added structured error handling (replaced
os.Exitand rawfmt.Print). - Used
http.Clientwith timeouts. - Switched from deprecated
ioutiltoiofor reading responses. - Embedded
UnimplementedTestApiServerfor forward compatibility. - Added constructor method
NewTestApiServer()for better code organization and testability.