Documentation
¶
Overview ¶
Package configreload owns typed field-level reloadability policy for runtime configuration changes. The secret-safe reload trigger/result/status vocabulary is declared once in pkg/lipsdk/configreload; this package owns history, sanitization, stage constants, and policy algorithms only. Trigger envelopes never carry paths, YAML, or URLs.
Index ¶
- Constants
- func MapLoadCategory(cat string) (sdkreload.ResultCategory, string)
- func MapLoadFailure(err error) (sdkreload.ResultCategory, string)
- func MissingClassifications(declared, inventoried []string) []string
- func RequiredStartupOverridePaths() []string
- func RequiredTopLevelPaths() []string
- func SanitizeConfigKey(key string) string
- func SanitizeDSN(dsn string) string
- func SanitizeFailure(err error) string
- func SanitizeOpaqueYAML(node *yaml.Node) string
- func SanitizePanicValue(v any) string
- func SanitizeURL(raw string) string
- func TypedComparatorSections() []string
- type ChangeDisposition
- type FieldClass
- type FieldDisposition
- type RestartRequiredError
- type SafeChange
- type StatusHistory
Constants ¶
const ( StageRead = "read" StageLoad = "load" StageNoop = "noop" StageClassify = "classify" StageCompile = "compile" StagePrepare = "prepare" StageRetention = "retention" StagePublish = "publish" StageRollback = "rollback" StageShutdown = "shutdown" StageBusy = "busy" StageCoalesce = "coalesce" StagePanic = "panic" )
Stage names used in ReasonCategory / diagnostics (bounded, non-secret).
const DefaultStatusHistoryCap = 32
DefaultStatusHistoryCap is the default bounded ring capacity for reload status history.
const MaxRestartRequiredFields = 32
MaxRestartRequiredFields bounds restart_required_fields (requirement 7.6).
const RedactedPlaceholder = "[redacted]"
RedactedPlaceholder is the bounded token substituted for secret material.
Variables ¶
This section is empty.
Functions ¶
func MapLoadCategory ¶
func MapLoadCategory(cat string) (sdkreload.ResultCategory, string)
MapLoadCategory maps a known LoadCategory string to a terminal result.
func MapLoadFailure ¶
func MapLoadFailure(err error) (sdkreload.ResultCategory, string)
MapLoadFailure maps effective-load / source-integrity failures to a terminal result category and bounded reason (req 2.10, 3.10). Values are never included.
func MissingClassifications ¶
MissingClassifications returns declared paths absent from inventoried paths.
func RequiredStartupOverridePaths ¶
func RequiredStartupOverridePaths() []string
RequiredStartupOverridePaths lists fixed CLI/env overrides (req 7.7).
func RequiredTopLevelPaths ¶
func RequiredTopLevelPaths() []string
RequiredTopLevelPaths lists every current YAML top-level Config section.
func SanitizeConfigKey ¶
SanitizeConfigKey returns a safe config field path. Values embedded after '=' or opaque segments that look like secrets are replaced.
func SanitizeDSN ¶
SanitizeDSN redacts passwords and credential material from DSN-like strings.
func SanitizeFailure ¶
SanitizeFailure returns a bounded, secret-safe failure summary.
func SanitizeOpaqueYAML ¶
SanitizeOpaqueYAML returns a bounded description without node values.
func SanitizePanicValue ¶
SanitizePanicValue returns only a safe type token or redacted placeholder.
func SanitizeURL ¶
SanitizeURL redacts userinfo and credential-bearing query parameters.
func TypedComparatorSections ¶
func TypedComparatorSections() []string
TypedComparatorSections lists every inventoried path covered by a maintained typed comparator in Classify (requirement 7.2 / task 2.2 FieldCoverage).
Types ¶
type ChangeDisposition ¶
type ChangeDisposition string
ChangeDisposition is the Classify outcome for one safe field path.
const ( ChangeReloadable ChangeDisposition = "reloadable" ChangeRestartRequired ChangeDisposition = "restart_required" )
type FieldClass ¶
type FieldClass struct {
Path string
Disposition FieldDisposition
SecretBearing bool
Notes string
}
FieldClass is one inventoried top-level section or startup override. SecretBearing is orthogonal to Disposition; errors never include values.
func Inventory ¶
func Inventory() []FieldClass
Inventory returns the authoritative reloadability classification table.
type FieldDisposition ¶
type FieldDisposition string
FieldDisposition is the maintained inventory disposition for one path. Every inventoried path must set exactly one; there is no implicit default.
const ( DispositionReloadable FieldDisposition = "reloadable" DispositionStartupOnly FieldDisposition = "startup_only" DispositionConditional FieldDisposition = "conditional" DispositionMixed FieldDisposition = "mixed" )
func (FieldDisposition) Valid ¶
func (d FieldDisposition) Valid() bool
Valid reports whether d is an explicit disposition.
type RestartRequiredError ¶
RestartRequiredError rejects a candidate before generation construction when any restart-required path is present (requirements 3.5, 7.5–7.6).
func (*RestartRequiredError) Error ¶
func (e *RestartRequiredError) Error() string
type SafeChange ¶
type SafeChange struct {
Path string
Disposition ChangeDisposition
}
SafeChange is a value-free description of a classified config difference.
func Classify ¶
func Classify(active, candidate *config.Config) ([]SafeChange, error)
Classify compares active and candidate configs using maintained typed section comparators (requirement 7.2). Mixed reloadable and restart-required diffs reject as one transaction (requirement 3.5).
func ClassifyEffective ¶
func ClassifyEffective(active, candidate *config.EffectiveConfig) ([]SafeChange, error)
ClassifyEffective classifies two effective configs for coordinator use.
type StatusHistory ¶
type StatusHistory struct {
// contains filtered or unexported fields
}
StatusHistory is a process-owned bounded ring of reload history entries. Entry shape is the canonical HistoryEntry from pkg/lipsdk/configreload.
func NewStatusHistory ¶
func NewStatusHistory(n int) *StatusHistory
NewStatusHistory creates a ring with capacity n (defaults to DefaultStatusHistoryCap).
func (*StatusHistory) Append ¶
func (h *StatusHistory) Append(e sdkreload.HistoryEntry)
Append records an entry, dropping the oldest when full.
func (*StatusHistory) Snapshot ¶
func (h *StatusHistory) Snapshot() []sdkreload.HistoryEntry
Snapshot returns a copy of recent entries (oldest first).