Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConfigReader

Abstract config reader that supports configuration parameterization.

Configuration parameters

  • parameters: this entire section is used as template parameters

    • ...

    @see IConfigReader

Hierarchy

Implements

  • IConfigurable

Index

Constructors

constructor

Methods

configure

  • configure(config: ConfigParams): void
  • Configures component by passing configuration parameters.

    Parameters

    • config: ConfigParams

      configuration parameters to be set.

    Returns void

Protected parameterize

  • parameterize(config: string, parameters: ConfigParams): string
  • Parameterized configuration template given as string with dynamic parameters.

    The method uses Handlebars template engine: https://handlebarsjs.com

    Parameters

    • config: string

      a string with configuration template to be parameterized

    • parameters: ConfigParams

      dynamic parameters to inject into the template

    Returns string

    a parameterized configuration string.

Abstract 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

Generated using TypeDoc