import * as rx from 'rxjs'; import { IDynamicProperty, IConfigurationSource, IRemoteConfigurationSource, DataSource } from './abstractions'; import { DynamicProperty } from './properties/dynamicProperty'; import { ChainedDynamicProperty } from './properties/chainedPropertyValue'; export declare class ConfigurationManager { pollingIntervalInSeconds: number; sourceTimeoutInMs: number; isRunning: boolean; private _values; private _dynamicProperties; private disposed; private _propertyChanged; private _environmentVariables; readonly properties: Map>; readonly propertyChanged: rx.Observable>; constructor(pollingIntervalInSeconds?: number, sourceTimeoutInMs?: number); getValueInSources(name: string): any; createDynamicProperty(name: string, defaultValue?: T): DynamicProperty; createChainedDynamicProperty(name: string, properties: Array, defaultValue?: T): DynamicProperty | ChainedDynamicProperty; getValueFromEnvironmentVariable(name: string): T; getProperty(name: string): IDynamicProperty; /** * Initialize source(s) and return only when all sources are initialized * @param sources List of sources * @returns {Promise} */ startPolling(sources?: IConfigurationSource | Array, pollSources?: boolean): Promise; /** * for test only */ forcePolling(src?: IRemoteConfigurationSource, reset?: boolean): Promise; /** * Pull properties for all sources * * @private * @param {any} [timeout] * @returns * * @memberOf ConfigurationManager */ polling(timeout?: number, pollSources?: boolean): Promise; onPropertiesChanged(data: DataSource): void; onPropertyChanged(dp: IDynamicProperty): void; private repeatPolling(); /** /// Reset configuration and properties. /// All current properties will be invalid and all current sources will be lost. /// /// /// */ reset(pollingIntervalInSeconds?: number, sourceTimeoutInMs?: number): void; dispose(): void; }