Type alias WeenieServiceManager

WeenieServiceManager: {
    svc: {
        whenReady: Promise<void>;
        declareReady: (() => void);
        onShutdown: ((task) => void);
        shutdown: (() => Promise<void>);
    };
}

The dependencies attached by this module

Type declaration

  • svc: {
        whenReady: Promise<void>;
        declareReady: (() => void);
        onShutdown: ((task) => void);
        shutdown: (() => Promise<void>);
    }
    • whenReady: Promise<void>

      A promise that can be awaited by various dependents. When this promise resolves, it means all dependencies have loaded successfully and the servie is ready to start.

    • declareReady: (() => void)

      A function used to declare that the service is ready

        • (): void
        • A function used to declare that the service is ready

          Returns void

    • onShutdown: ((task) => void)

      Register a shutdown task, such as disconnecting from a database or terminating outstanding HTTP requests

        • (task): void
        • Register a shutdown task, such as disconnecting from a database or terminating outstanding HTTP requests

          Parameters

          • task: (() => Promise<void>)
              • (): Promise<void>
              • Returns Promise<void>

          Returns void

    • shutdown: (() => Promise<void>)

      Runs the shutdown routines and ends the process.

        • (): Promise<void>
        • Runs the shutdown routines and ends the process.

          Returns Promise<void>

Generated using TypeDoc