/************************************************************************* * * Troven CONFIDENTIAL * __________________ * * (c) 2017-2020 Troven Ventures Pty Ltd * All Rights Reserved. * * NOTICE: All information contained herein is, and remains * the property of Troven Pty Ltd and its licensors, * if any. The intellectual and technical concepts contained * herein are proprietary to Troven Pty Ltd * and its suppliers and may be covered by International and Regional Patents, * patents in process, and are protected by trade secret or copyright law. * Dissemination of this information or reproduction of this material * is strictly forbidden unless prior written permission is obtained * from Troven Pty Ltd. */ /// import "source-map-support/register"; import * as express from "express"; import * as EventEmitter from "events"; import { IChassisContext, IChassisPlugin, IChassisMiddleware, IPackage, IChassisMetrics, IChassisSecrets } from "../interfaces"; import { Registry } from "./Registry"; import { IChassisConfig } from "../interfaces/IChassisConfig"; export declare class Chassis { plugins: Registry; middleware: Registry; booted: boolean; context: IChassisContext; config: any; constructor(config: IChassisConfig, bootFn?: Function); metrics: IChassisMetrics; secrets: IChassisSecrets; uuid: string; bus: EventEmitter.EventEmitter; app: express.Application; api: express.Router; /** * Launch the Chassis. * Initializes the Chassis (process event listeners, etc) * * Installs all of the registered plugins. * * Starts listening for HTTP/S requests on a port. * * Emits "api:init" event to announce it's availability * * @returns {IChassisContext} */ start(): IChassisContext; pkg(): IPackage; /** * Initialize a ChassisContext from a given configuration object * * Create the IChassisContext and binds the runtime instances * * Must be called before start() * * @param config * @returns {IChassisContext} */ private init; _stamp(context: IChassisContext, _log: any): any; boot(bootFn?: Function): void; emit_log(code: string, verbose_context: boolean, do_emit: boolean, _logged: any): any; installPlugins(context: IChassisContext, config: any): void; /** * Register Plugin * @param {IChassisPlugin} plugin */ registerPlugin(plugin: IChassisPlugin): IChassisPlugin; /** * Register Middleware * @param {IChassisPlugin} plugin */ registerFn(plugin: IChassisMiddleware): IChassisMiddleware; process_guard(): void; }