settings

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 dracory/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

func SeedEngineOverrides(engine any, cfg map[string]any)

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

func (s *Section) SetServerInfo(info map[string]any)

SetServerInfo installs host-supplied facts (auth enabled, ...) reported read-only by load-settings; safe to leave unset.

func (*Section) UI

func (s *Section) UI(config shared.UiConfig) UiInterface

UI creates a new settings section UI from the given config.

type UiInterface

type UiInterface interface {
	SettingsManager(w http.ResponseWriter, r *http.Request)
}

UiInterface defines the settings section's UI interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL