Unit that loads configuration for and manages instantiation of an IORedis connection.

Hierarchy

Constructors

Properties

config: Config

The config service.

connection?: Redis

The instantiated connection, if one exists.

logging: Logging

The loggers.

spawnedConnections: Collection<Redis> = ...

Collection of all Redis connections opened by this service. We keep track of these here so we can make sure -all- of them get closed when the framework tries to shut down.

status: UnitStatus = UnitStatus.Stopped

The current status of the unit.

Accessors

Methods

  • This method is called to stop the unit when the application is shutting down. Here, you should do any teardown required to stop the package cleanly.

    IN PARTICULAR take care to free blocking resources that could prevent the process from exiting without a kill.

    Returns Promise<void>

  • Get the method with the given name from this class, bound to this class.

    Returns

    function

    Parameters

    • methodName: string

    Returns ((...args: any[]) => any)

      • (...args: any[]): any
      • Get the method with the given name from this class, bound to this class.

        Returns

        function

        Parameters

        • Rest ...args: any[]

        Returns any

  • Call the make() method on the global container.

    Type Parameters

    • T

    Parameters

    • target: any
    • Rest ...parameters: any[]

    Returns T

  • This method is called to start the unit when the application is booting. Here, you should do any setup required to get the package up and running.

    Returns Promise<void>