Commit Graph

2 Commits

Author SHA1 Message Date
douxu 715183994c fix: remove status mutation side effect in PublishEventToUI
- stop overwriting record.Status inside the publish function
  - status should be managed by the caller, not the publisher
2026-05-11 17:35:43 +08:00
douxu 2f7cd5a8fc feat: add event lifecycle API and UI fanout publishing - extract event status, MQ exchange/queue, and DB name constants to constants/event.go - add bson tags and IsPersisted flag to EventRecord for proper MongoDB serialization
- publish persisted alarm events to UI consumers via RabbitMQ fanout exchange                                                 - add GET /events/:event_uuid handler to query a single event from MongoDB
  - add PATCH confirm/close handlers with atomic FindOneAndUpdate status transitions                                            - register /events routes in main.go
2026-05-08 15:43:54 +08:00