How 07-athi/logmind works
logmind is a Go HTTP service for submitting application logs and retrieving their analysis. The synchronous workflow validates a submitted log, analyzes it with Gemini, stores the result, and returns it; the optional Kafka path stores a pending entry, queues it, and lets a consumer analyze and update it. The README also mentions OpenAI, but the sampled implementation configures Gemini. Kafka and in-memory storage are confirmed in source; deployment details are omitted from this runtime map.
Main entry points: logs.go Log Handler · analyzer.go Kafka Consumer · logging.go HTTP Middleware · llm.go Analyzer Interface
Components 12
HTTP API
- HTTP Server
main.go - HTTP Middleware
middleware/logging.go - Log Handler
handler/logs.go - Log Entry
model/log.go - In-memory Store
store/store.go
Log Analysis
- Analyzer Interface
service/llm.go - Gemini Analyzer
service/llm.go
Async Ingestion
- Kafka Producer
service/analyzer.go - Kafka Consumer
service/analyzer.go
Other components
- API Client
- Gemini API
- Kafka Broker
Connections 14
- API Client → HTTP Middleware: HTTP request
- HTTP Server → HTTP Middleware: serves through
- HTTP Middleware → Log Handler: dispatches
- Log Handler → Log Entry: decodes
- Log Handler → In-memory Store: saves / reads
- Log Handler → Analyzer Interface: analyzes inline
- Analyzer Interface → Gemini Analyzer: implemented by
- Gemini Analyzer → Gemini API: generates analysis
- Log Handler → Kafka Producer: publishes when enabled
- Kafka Producer → Kafka Broker: writes log
- Kafka Broker → Kafka Consumer: delivers log
- Kafka Consumer → Analyzer Interface: analyzes
- Kafka Consumer → In-memory Store: saves result
- Log Handler → API Client: returns response