Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IConfigReader

Interface for configuration readers that retrieve configuration from various sources and make it available for other components.

Some IConfigReader implementations may support configuration parameterization. The parameterization allows to use configuration as a template and inject there dynamic values. The values may come from application command like arguments or environment variables.

Hierarchy

  • IConfigReader

Implemented by

Index

Methods

addChangeListener

  • addChangeListener(listener: INotifiable): void
  • Adds a listener that will be notified when configuration is changed

    Parameters

    • listener: INotifiable

      a listener to be added.

    Returns void

readConfig

  • readConfig(correlationId: string, parameters: ConfigParams, callback: function): void
  • Reads configuration and parameterize it with given values.

    Parameters

    • correlationId: string

      (optional) transaction id to trace execution through call chain.

    • parameters: ConfigParams

      values to parameters the configuration or null to skip parameterization.

    • callback: function

      callback function that receives configuration or error.

        • (err: any, config: ConfigParams): void
        • Parameters

          • err: any
          • config: ConfigParams

          Returns void

    Returns void

removeChangeListener

  • removeChangeListener(listener: INotifiable): void
  • Remove a previously added change listener.

    Parameters

    • listener: INotifiable

      a listener to be removed.

    Returns void

Generated using TypeDoc