reload

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

Jump to

Keyboard shortcuts

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