Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
Bus is a thread-safe broadcast pub/sub hub. Each subscriber gets its own buffered channel (full buffers are skipped, never blocking the publisher), and the latest event per Kind is retained for snapshots to late joiners.
type Event ¶
type Event struct {
ID uint64 // monotonically increasing; used for SSE Last-Event-ID
Kind Kind
Payload Payload
}
Event carries a single state change notification from a producer to subscribers.
type ImagePayload ¶
type ImagePayload struct {
Names []string `json:"names"`
}
ImagePayload carries the current slide's image names (one solo, two for a split pair). Empty signals no image.
type KioskLabels ¶
type KioskLabels struct {
Outside string `json:"outside"`
Inside string `json:"inside"`
Humidity string `json:"humidity"`
}
KioskLabels mirrors config.KioskLabelsConfig; empty strings hide the caption.
type KioskPayload ¶
type KioskPayload struct {
Version string `json:"version"` // running build; the kiosk reloads when it changes (post-update)
Locale string `json:"locale"`
HideClockDate bool `json:"hide_clock_date"`
Timezone string `json:"timezone"`
Sensors []string `json:"sensors"`
Weather bool `json:"weather"`
Labels KioskLabels `json:"labels"`
}
KioskPayload carries the kiosk overlay's render inputs.
type Payload ¶
type Payload interface {
// contains filtered or unexported methods
}
Payload is a sealed interface. Only types defined in this package satisfy it, keeping the set of bus event shapes explicit and compiler-checked at publish sites.
type ScreenAspectPayload ¶ added in v1.1.0
type ScreenAspectPayload struct {
Aspect float64 `json:"aspect"`
}
ScreenAspectPayload carries the kiosk's reported aspect (width/height) so the admin dashboard can size its preview to match the frame.
type ScreenPayload ¶
ScreenPayload carries two distinct facets so consumers don't conflate them: On is the live panel power (moves on idle-blank, motion, drift); Auto is the manual intent (motion auto-wake enabled), which only a manual on/off changes.
type SensorPayload ¶
type WeatherPayload ¶
type WeatherPayload struct {
IconCode string `json:"icon_code"`
Temp float64 `json:"temp"`
Humidity float64 `json:"humidity"`
}
WeatherPayload carries the latest weather; a zero value (empty IconCode) signals a failed poll.