Documentation
    Preparing search index...

    Class MemoryConfigSource

    In-memory configuration source for runtime programmatic overrides and unit testing.

    Hierarchy (View Summary)

    Index

    Constructors

    • Construct a new MemoryConfigSource.

      Parameters

      • OptionalinitialData: Record<string, unknown>

        Optional initial key-value configuration.

      • name: string = 'memory'

        Source identifier (defaults to 'memory').

      • priority: number = 100

        Source priority (defaults to 100).

      Returns MemoryConfigSource

    Properties

    _store: Map<string, unknown>
    name: string

    Human-readable identifier for this configuration source.

    priority: number

    Numeric priority level used for resolution ordering. Higher priority sources override lower priority ones.

    Methods

    • Helper assigning a nested value into the target sub-tree.

      Parameters

      • subTree: Record<string, unknown>
      • subPath: string
      • val: unknown

      Returns void

    • Extracts nested configuration object if key is a prefix for stored paths.

      Parameters

      • key: string

      Returns Record<string, unknown> | undefined

    • Resolves dot-notation path traversing an in-memory object tree.

      Parameters

      • key: string

      Returns unknown

    • Retrieve a value from memory store.

      Parameters

      • key: string

        Property key or dot-notation path.

      Returns unknown

      Value if present, or undefined.

    • Returns all stored entries.

      Returns Record<string, unknown>

    • Checks if a key exists in the store.

      Parameters

      • key: string

        Property key or dot-notation path.

      Returns boolean

      True if key exists.

    • Set a value in the memory store. Supports dot notation (e.g. 'database.host').

      Parameters

      • key: string

        Property key or dot-notation path.

      • value: unknown

        Value to set.

      Returns void