Documentation
¶
Overview ¶
Package updater holds the auto-update domain: the typed State, the daemon-SystemEvent metadata schema, and the Holder that caches the latest state and broadcasts changes. No Wails dependency.
Index ¶
Constants ¶
const EventStateChanged = "netbird:update:state"
EventStateChanged carries the full State snapshot as payload.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
Emitter is the broadcast dependency Holder needs; the Wails app.Event processor satisfies it.
type Holder ¶
type Holder struct {
// contains filtered or unexported fields
}
Holder caches the latest update State and broadcasts changes.
func (*Holder) OnSystemEvent ¶
func (h *Holder) OnSystemEvent(ev *proto.SystemEvent)
OnSystemEvent folds update-related metadata into the cached state, emitting EventStateChanged only on an actual change so repeated daemon snapshots don't produce redundant pushes.
type State ¶
type State struct {
Available bool `json:"available"`
Version string `json:"version"`
Enforced bool `json:"enforced"`
Installing bool `json:"installing"`
}
State is the typed snapshot of the daemon's update situation. Installing is driven only by the daemon's progress_window:show event; a UI-side Update.Trigger() does not flip it.