/// import * as express from 'express'; import * as http from 'http'; import * as https from 'https'; declare type InternalService = http.Server | https.Server; /** * @description * Initialize an Henson service that is deployed on `internal-data-network`. * Whether HTTP or HTTPS is applied depends on the parameter `palInternalServiceProtocol`. * @param {express.Express} app The `express` application instance * @returns {InternalService} The instance of the internal service * @throws * - Exception thrown by `@anpingli/common`'s `config.get`. * - Expection thrown by `fs.readFileSync`. */ declare function initInternalService(app: express.Express): InternalService; declare function startInternalServiceWithHostname(app: express.Express, port: number, hostname: string, errorHandler: (error: Error) => void): InternalService; /** * @description * Initialize and start an Henson service that is deployed on `internal-data-network`. * Whether HTTP or HTTPS is applied depends on the parameter `palInternalServiceProtocol`. * @param {express.Express} app The `express` application instance * @param {number} port The port for listening * @param {(error:Error)=>void} errorHandler The callbck to handle 'error' events after listening * @returns {InternalService } The instance of the internal service * @throws * - Exception thrown by `fs.readFileSync` * - Exception thrown by `express`'s `Application.listen` */ declare function startInternalService(app: express.Express, port: number, errorHandler: (error: Error) => void): InternalService; export { InternalService, initInternalService, startInternalService, startInternalServiceWithHostname, };