UNPKG

pig-dam-cfg

Version:

Pig DAM's configuration information server

63 lines 1.91 kB
/** * Date: 6/12/20 * Time: 11:22 PM * @license MIT (see project's LICENSE file) */ import { ClusterManifest, ClusterSettings, ServerConfiguration } from "./types"; /** * The following types match the schema of our manifest and clusters. * But it's not the schema we use internally. We refine the data and reduce * it down to absolute server hosts and ports. We don't want to share these types. */ declare type DeploymentState = "container" | "debug"; interface InternalClusterConfiguration { factory: InternalServiceConfiguration; mongo: InternalServiceConfiguration; search: InternalServiceConfiguration; server: InternalServiceConfiguration; } interface InternalClusterDeployment { factory?: DeploymentState; mongo?: DeploymentState; search?: DeploymentState; server?: DeploymentState; } interface InternalClusterManifest { /** * We allow this to be a path in practice. If it is then when we load it * we will load the reference to the cluster. */ cluster: InternalClusterConfiguration | string; deployment?: InternalClusterDeployment; environment: { desc?: string; name: string; }; settings: ClusterSettings; } /** * Properties shared by all modules */ interface InternalServiceConfiguration { name: string; server: { debug: ServerConfiguration; docker: ServerConfiguration; }; } /******************** * Public Interface ********************/ /** * Loads the manifest pointed to by `path` * @throws {Error} */ export declare function getClusterManifest(path?: string): ClusterManifest; /** * Loads the manifest pointed to by `path`. And will make sure the `cluster` is loaded * if it is referenced by a path. * @throws {Error} */ export declare function loadManifestConfiguration(path: string): InternalClusterManifest; export {}; //# sourceMappingURL=manifest.d.ts.map