Class SettingsManagerAccessors<CustomSettings>

SettingsManager is responsible for managing the application's settings, including the configuration for the service registry and custom settings specified by the user. It extends EventEmitter to allow for emitting events related to settings management and implements the Service interface from the Layer.App namespace, indicating its role in the application's service architecture. It utilizes configuration managers for both service registry and custom settings, supporting dynamic loading and management of these configurations.

Additionally, it can load application metadata from package.json and README.md content, providing a centralized way to access application information and documentation.

Type Parameters

Hierarchy (View Summary)

Implements

Constructors

Properties

instanceId: string = ...

Instance identifier

package?: Package

Package version info

readme?: string

Readme file content

Accessors

  • get componentId(): string
  • Returns string

    Service instance identifier

  • get error(): undefined | Multi
  • Returns undefined | Multi

    A validation error, if exist, in the configuration loaded

  • get isPrimary(): boolean
  • Returns boolean

    If the application is the primary node in the cluster

  • get isWorker(): boolean
  • Returns boolean

    If the application is a worker node in the cluster

  • get name(): string
  • Returns string

    Service name

  • get namespace(): undefined | string
  • Returns undefined | string

    Application namespace

  • get release(): string
  • Returns string

    Application release

  • get router(): Router
  • Returns Router

    Express router with access to config information

  • get status(): "pass" | "fail" | "warn"
  • Returns "pass" | "fail" | "warn"

    Settings manager status

Methods