Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrStaticFieldChange = fmt.Errorf("static field change rejected")
ErrStaticFieldChange indicates a reload diff attempted to modify a static field.
Functions ¶
This section is empty.
Types ¶
type ReloadManager ¶
type ReloadManager struct {
// contains filtered or unexported fields
}
ReloadManager provides a minimal implementation to exercise dynamic reload semantics for the internal reload tests. It intentionally keeps scope small: field classification, serialization, atomic application and basic metrics hooks can evolve later.
func NewReloadManager ¶
func NewReloadManager(dynamic []string) *ReloadManager
NewReloadManager creates a manager with the provided dynamic field paths. Any change outside this set is treated as static and rejected.
func (*ReloadManager) AppliedBatches ¶
func (m *ReloadManager) AppliedBatches() [][]modular.ConfigChange
AppliedBatches returns a copy of applied change batches for inspection in tests.
func (*ReloadManager) ApplyDiff ¶
func (m *ReloadManager) ApplyDiff(ctx context.Context, module modular.Reloadable, section string, diff *modular.ConfigDiff) error
ApplyDiff converts a ConfigDiff into ConfigChange slice filtered to dynamic fields and applies them to the given Reloadable module atomically. If any static field is present in the diff it rejects the whole operation.