vulcain-corejs
Version:
Vulcain micro-service framework
23 lines (22 loc) • 770 B
TypeScript
import { ConfigurationSource } from './configurationSource';
export declare class ConsulConfigurationSource implements ConfigurationSource {
private _changes;
private _allkeys;
private _initialized;
private consul;
private globalKeys;
private serviceKey;
private globalWatch;
private serviceWatch;
constructor(globalKeys?: string, serviceKey?: string, consulAddress?: string);
/**
* get configurations from consul
* First time retrieve all then watch for changes and
* store them locally for the next polling.
*/
pollPropertiesAsync(timeoutInMs: number): any;
getAsync(key: string): Promise<any>;
private merge(prefix, data);
private watchDefinitionsChanges();
private watchChanges(key);
}