fix: cache realtime snapshots by vehicle key

This commit is contained in:
lingniu
2026-07-02 00:21:50 +08:00
parent bcf7cdae2e
commit f3ecf430cc
3 changed files with 97 additions and 27 deletions

View File

@@ -7,6 +7,7 @@ import (
)
type Snapshot struct {
VehicleKey string `json:"vehicle_key"`
VIN string `json:"vin"`
Protocol envelope.Protocol `json:"protocol,omitempty"`
EventID string `json:"event_id,omitempty"`
@@ -19,6 +20,7 @@ type Snapshot struct {
}
type OnlineStatus struct {
VehicleKey string `json:"vehicle_key"`
VIN string `json:"vin"`
Online bool `json:"online"`
LastSeenMS int64 `json:"last_seen_ms"`