Documentation
¶
Overview ¶
Package settings reads the fleet's dynamic-config files (base/ and overrides.yaml), checks them against the settings catalog, and merges them per role.
Index ¶
Constants ¶
const StopTimeout = 90 * time.Second
StopTimeout is how long systemd waits for a role to stop before it kills it (TimeoutStopSec in temporal@.service).
Variables ¶
This section is empty.
Functions ¶
func ParseDuration ¶
ParseDuration reads a duration the way Temporal does (timestamp.ParseDurationDefaultSeconds): Go's syntax, plus d for 24 hours, and a number without a unit is seconds.
Types ¶
type Layers ¶
type Layers struct {
Common File // base/common.yaml
Roles map[string]File // base/<role>.yaml, by role
Overrides File // environments/<env>/overrides.yaml
}
Layers are the files that set the dynamic config of an environment's roles, in merge order: later wins, a whole key at a time (TD "Dynamic-config merge order").
func (Layers) Check ¶
Check returns the errors and the warnings of the layers: a key in a role's file that the role does not read, a key in both common.yaml and a role's file, and a role that would not stop before systemd kills it.
type Source ¶
Source is the list a role runs and the file it comes from, "default" when no file sets it.
type Trace ¶
type Trace struct {
Default any `json:"default"`
Common []Value `json:"common,omitempty"`
Roles map[string][]Value `json:"roles,omitempty"`
Override []Value `json:"override,omitempty"`
Effective map[string]Source `json:"effective"`
}
Trace is where a setting gets its value in an environment (backend schema Knobs layers): the catalog default, the list each file sets, and what each role that reads it runs. A role file is in Roles only when it sets the key.