Commit Graph

9 Commits

Author SHA1 Message Date
Daniel Pupius 0784ccb958 Simplify packet construction 2025-04-21 22:34:49 -07:00
Daniel Pupius f580249162 Another checkpoint moving to proto defined packets 2025-04-21 18:27:55 -07:00
Daniel Pupius 86380cccf9 Refactor protos 2025-04-21 15:40:10 -07:00
Daniel Pupius 41ee61b59a Updated logging configuration for dev and json for prod 2025-04-21 14:16:35 -07:00
Daniel Pupius c6d94b10d1 Inject loggers from main.go instead of creating them locally
- Update all components to accept a logger parameter
- Add default fallbacks when logger is not provided
- Ensure consistent logger naming with parent.Named() pattern
- Create a proper logger hierarchy originating from main.go
- Update MessageLogger to pass logger to BaseSubscriber
2025-04-21 11:09:27 -07:00
Daniel Pupius 9447f44139 Update logging to use prefab/logging package
- Replace standard log package with prefab/logging
- Add context-aware logging in HTTP handlers
- Add structured logging with fields and levels
- Improve logging hierarchy and namespaces
- Implement named loggers for components
2025-04-21 11:01:45 -07:00
Daniel Pupius 8c52664cc5 Refactor message handling to use switch statement
- Replace if-else chain with cleaner switch statement
- Add support for "c" format messages
- Improve code structure and readability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 19:09:37 -07:00
Daniel Pupius 4eb98b7455 Simplify MQTT package API by embedding TopicInfo
- Created Packet to combine DecodedPacket and TopicInfo
- Updated MQTT client to return Packet instead of wrapper type
- Modified main.go to use the simplified structure
- Updated tests to use the new Packet type

This change simplifies the API and reduces the cognitive load
for consumers of the MQTT package.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 19:08:01 -07:00
Daniel Pupius 879877fa53 Refactor MQTT handling into separate package
- Created new mqtt package with simple client interface
- Implemented buffered channel for decoded messages
- Updated main.go to use the new MQTT client
- Added tests for the MQTT client
- Simplified message handling to focus on 'e' and 'map' formats
- Added TODO for handling JSON format messages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-20 18:11:15 -07:00