topfans/backend/services/statisticService
zerosaturation bed8f8e578 feat(statistic): T4-T8 event collection framework (Event + Sink + Repo + Service + Workers)
- Event model + ToJSON
- EventSink interface + ChannelEventSink (non-blocking Submit)
- event_repo: batch INSERT ON CONFLICT DO NOTHING dedup
- event_service: 7-type whitelist + 1KB props limit + ReceivedAt auto-fill
- event_flusher: 100/1s batch + sync metric_recent_level_ups on level_up
- metric_weekly + metric_upcoming workers (5min/15min with pg_try_advisory_lock)
- partitioner: 7-day pre-create + 30-day cleanup (00:05 create / 00:30 cleanup)
- 22 unit + integration tests (model/repo/service/sink/worker)

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 17:20:53 +08:00
..
config feat(statistic): T3 service skeleton (config + main + healthz + metrics + 10 SQL) 2026-06-08 17:20:53 +08:00
handler feat(statistic): T3 service skeleton (config + main + healthz + metrics + 10 SQL) 2026-06-08 17:20:53 +08:00
metrics feat(statistic): T3 service skeleton (config + main + healthz + metrics + 10 SQL) 2026-06-08 17:20:53 +08:00
model feat(statistic): T4-T8 event collection framework (Event + Sink + Repo + Service + Workers) 2026-06-08 17:20:53 +08:00
repository feat(statistic): T4-T8 event collection framework (Event + Sink + Repo + Service + Workers) 2026-06-08 17:20:53 +08:00
service feat(statistic): T4-T8 event collection framework (Event + Sink + Repo + Service + Workers) 2026-06-08 17:20:53 +08:00
sink feat(statistic): T4-T8 event collection framework (Event + Sink + Repo + Service + Workers) 2026-06-08 17:20:53 +08:00
worker feat(statistic): T4-T8 event collection framework (Event + Sink + Repo + Service + Workers) 2026-06-08 17:20:53 +08:00
go.mod feat(statistic): scaffold statisticService with go.mod and directory structure 2026-06-08 17:20:53 +08:00
go.sum feat(statistic): scaffold statisticService with go.mod and directory structure 2026-06-08 17:20:53 +08:00
main.go feat(statistic): T3 service skeleton (config + main + healthz + metrics + 10 SQL) 2026-06-08 17:20:53 +08:00