Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApproximateRegion ¶
ApproximateRegion converts coordinates into a coarse, human-readable descriptor so summaries stay meaningful without external GeoIP data.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service wires session tracking, event ingestion, and hourly summaries together using channels so request handlers never block on IO-heavy operations.
func NewService ¶
NewService prepares the analytics pipeline without starting it so callers can decide when to spawn goroutines.
func (*Service) Middleware ¶
Middleware assigns session cookies and logs high-level HTTP activity without blocking request handlers.
func (*Service) RecordEvent ¶
func (s *Service) RecordEvent(event database.AnalyticsEvent)
RecordEvent enqueues a single analytics event, dropping it if the queue is saturated to keep the UI responsive.
Click to show internal directories.
Click to hide internal directories.