package protocol import "time" type MetricSample struct { ID string `json:"id,omitempty"` ServerInstanceID string `json:"serverInstanceId"` Online bool `json:"online"` PlayerCount *int `json:"playerCount,omitempty"` MaxPlayers *int `json:"maxPlayers,omitempty"` TPS *float64 `json:"tps,omitempty"` LatencyMS *float64 `json:"latencyMs,omitempty"` CPUPercent *float64 `json:"cpuPercent,omitempty"` MemoryPercent *float64 `json:"memoryPercent,omitempty"` DiskPercent *float64 `json:"diskPercent,omitempty"` Source string `json:"source"` CollectedAt time.Time `json:"collectedAt"` } type MetricBatchIngestRequest struct { RunEndpointID string `json:"runEndpointId"` SessionToken string `json:"sessionToken"` Samples []MetricSample `json:"samples"` } type MetricBatchIngestResponse struct { Accepted bool `json:"accepted"` AcceptedCount int `json:"acceptedCount"` LatestAt time.Time `json:"latestAt"` ServerTime time.Time `json:"serverTime"` }