UNPKG

pmcf

Version:

Poor mans configuration management

576 lines (575 loc) 18 kB
/** * * @param {*} sources * @param {Object} [options] * @param {Function} [options.services] filter for services * @param {Function} [options.endpoints] filter for endpoints * @param {Function} [options.select] mapper from Endpoint into result * @param {number} [options.limit] upper limit of # result items * @param {string} [options.join] join result(s) into a string * @returns {string|any} */ export function serviceEndpoints(sources: any, options?: { services?: Function; endpoints?: Function; select?: Function; limit?: number; join?: string; }): string | any; export namespace endpointProperties { export let port: { type: string; isKey: boolean; writable: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; export let protocol: { writable: boolean; values: string[]; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; export let type: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; export { string_collection_attribute as types }; export { boolean_attribute_false as tls }; } export namespace EndpointTypeDefinition { export let name: string; export let owners: string[]; export let priority: number; export let specializations: {}; export { endpointProperties as properties }; } export namespace ServiceTypeDefinition { let name_1: string; export { name_1 as name }; let owners_1: string[]; export { owners_1 as owners }; let priority_1: number; export { priority_1 as priority }; let _extends: { name: string; owners: any[]; properties: { owner: { type: string; collection: boolean; writable: boolean; }; type: import("pacc").AttributeDefinition; name: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; description: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; priority: import("pacc").AttributeDefinition; directory: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; packaging: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; disabled: import("pacc").AttributeDefinition; tags: import("pacc").AttributeDefinition; }; }; export { _extends as extends }; let specializations_1: {}; export { specializations_1 as specializations }; export function factoryFor(owner: any, value: any): any; export let properties: { alias: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; weight: { type: string; isKey: boolean; writable: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; systemd: import("pacc").AttributeDefinition; port: { type: string; isKey: boolean; writable: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; protocol: { writable: boolean; values: string[]; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; type: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; types: typeof string_collection_attribute; tls: import("pacc").AttributeDefinition; hostName: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; cidrAddresses: { writable: boolean; collection: boolean; type: string; isKey: boolean; mandatory: boolean; private: boolean; depends: string; description: string; default: any; set: Function; get: Function; env: string[] | string; }; cidrAddress: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; addresses: { writable: boolean; collection: boolean; type: string; isKey: boolean; mandatory: boolean; private: boolean; depends: string; description: string; default: any; set: Function; get: Function; env: string[] | string; }; address: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; }; } export class Service extends Base { static get typeDefinition(): { name: string; owners: string[]; priority: number; extends: { name: string; owners: any[]; properties: { owner: { type: string; collection: boolean; writable: boolean; }; type: import("pacc").AttributeDefinition; name: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; description: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; priority: import("pacc").AttributeDefinition; directory: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; packaging: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; disabled: import("pacc").AttributeDefinition; tags: import("pacc").AttributeDefinition; }; }; specializations: {}; factoryFor(owner: any, value: any): any; properties: { alias: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; weight: { type: string; isKey: boolean; writable: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; systemd: import("pacc").AttributeDefinition; port: { type: string; isKey: boolean; writable: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; protocol: { writable: boolean; values: string[]; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; type: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; types: typeof string_collection_attribute; tls: import("pacc").AttributeDefinition; hostName: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; cidrAddresses: { writable: boolean; collection: boolean; type: string; isKey: boolean; mandatory: boolean; private: boolean; depends: string; description: string; default: any; set: Function; get: Function; env: string[] | string; }; cidrAddress: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; addresses: { writable: boolean; collection: boolean; type: string; isKey: boolean; mandatory: boolean; private: boolean; depends: string; description: string; default: any; set: Function; get: Function; env: string[] | string; }; address: { writable: boolean; type: string; isKey: boolean; mandatory: boolean; collection: boolean; private?: boolean; depends?: string; description?: string; default?: any; set?: Function; get?: Function; env?: string[] | string; }; }; }; _alias: any; _weight: any; _type: any; _port: any; _systemd: any; _extends: any[]; set extends(value: any[]); get extends(): any[]; get host(): Host; hosts(): Generator<any, void, any>; get domainName(): any; get networks(): Set<any>; get subnets(): Set<any>; get serviceTypeEndpoints(): any; endpoints(filter: any): (UnixEndpoint | HTTPEndpoint | Endpoint | DomainNameEndpoint)[]; endpoint(filter: any): UnixEndpoint | HTTPEndpoint | Endpoint | DomainNameEndpoint; address(options?: { endpoints: (e: any) => boolean; select: (e: any) => any; limit: number; join: string; }): string | any[]; set alias(value: any); get alias(): any; set port(value: any); get port(): any; set weight(value: any); get weight(): any; set type(value: any); get type(): any; get types(): Set<any>; get systemdServices(): any; dnsRecordsForDomainName(domainName: any, hasSVRRecords: any): { type: any; key: any; values: any[]; toString: (maxKeyLength?: number, ttl?: string) => string; }[]; } export function sortAscendingByPriority(a: any, b: any): number; export function sortDescendingByPriority(a: any, b: any): number; import { string_collection_attribute } from "pacc"; import { boolean_attribute_false } from "pacc"; import { Base } from "pmcf"; import { Host } from "pmcf"; import { UnixEndpoint } from "pmcf"; import { HTTPEndpoint } from "pmcf"; import { Endpoint } from "pmcf"; import { DomainNameEndpoint } from "pmcf";