feat: add live server-time card with host

This commit is contained in:
Jonas Kaninda
2026-07-06 20:30:13 +02:00
parent b4a740590b
commit f01a26dae8
5 changed files with 124 additions and 17 deletions
+8 -4
View File
@@ -8,11 +8,15 @@ import "sync"
// - "created" → Entry is set (a new signature)
// - "deleted" → ID is set (a removed signature)
// - "presence" → Online is set (connected-client count changed)
// - "tick" → Time/Version/Host are set (live server clock; new in v2)
type Event struct {
Type string `json:"type"`
Entry *Entry `json:"entry,omitempty"`
ID uint `json:"id,omitempty"`
Online int `json:"online,omitempty"`
Type string `json:"type"`
Entry *Entry `json:"entry,omitempty"`
ID uint `json:"id,omitempty"`
Online int `json:"online,omitempty"`
Time string `json:"time,omitempty"`
Version string `json:"version,omitempty"`
Host string `json:"host,omitempty"`
}
// Broker is a tiny in-process pub/sub hub. Each connected SSE client holds one