container.ts
Version:
Modular application framework
28 lines (27 loc) • 1.02 kB
TypeScript
import { Observable } from "rxjs/Observable";
import "rxjs/add/observable/of";
import "rxjs/add/operator/switchMap";
import { IContainerModuleOpts, ContainerModule } from "../../container";
/** Process information interface. */
export interface IProcess {
name?: string;
version?: string;
}
export declare const ASSET_PROCESS_JSON = "process.json";
/** Node.js process interface. */
export declare class Process extends ContainerModule {
/** Get Node.js process title. */
static readonly title: string;
/** Set Node.js process title. */
static setTitle(name?: string): string;
private _assets;
private _version;
readonly title: string;
readonly version: string;
readonly nodeEnvironment: string;
constructor(name: string, opts: IContainerModuleOpts);
/** Read process information assets file, handle process events. */
start(): Observable<void>;
/** Stop container when process termination event received. */
protected handleStop(event: string): void;
}