Documentation
¶
Overview ¶
Package settings is the settings section of the node admin, modeled on flowadmin's settingsmanager (itself the taskadmin/shopadmin folder-per-controller pattern): the nodeadmin dispatch map invokes section.UI(uiConfig).SettingsManager(w, r) for ?controller=settings — no action renders the page through the UiConfig layout, ?action=load-settings and ?action=save-setting answer JSON AJAX requests in the gouniverse/api envelope under the same controller URL.
Editable values are runtime engine overrides persisted inside the config store's "global_config" blob (the "engine" section next to "env") and applied to the live engine; startup/env-var values and server facts are reported read-only. The package never names a runner in its exported surface — the stock noderunner.WorkflowEngine is asserted structurally.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SeedEngineOverrides ¶
SeedEngineOverrides applies persisted engine overrides (the "engine" section of the global-config blob) onto the engine at boot — called by nodeadmin.New so env-var/flag values remain the fallback for keys with no override. No-op for foreign engines.
Types ¶
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section owns the settings surface state: the startup snapshot (taken before persisted overrides apply), the engine/store handles and the host-supplied server facts.
func New ¶
func New(engine any, store nodestore.StoreInterface) *Section
New creates the settings section. engine may be anything — the stock *noderunner.WorkflowEngine gets live tuning; foreign engines report an empty engine block. Startup values are snapshotted before persisted overrides apply so clearing an override restores them.
func (*Section) SetServerInfo ¶
SetServerInfo installs host-supplied facts (auth enabled, ...) reported read-only by load-settings; safe to leave unset.
type UiInterface ¶
type UiInterface interface {
SettingsManager(w http.ResponseWriter, r *http.Request)
}
UiInterface defines the settings section's UI interface.