acm-client
Version:
aliyun acm client
116 lines (115 loc) • 4.2 kB
TypeScript
import { DataClient } from './client';
import { BaseClient } from './interface';
declare const APIClientBase: any;
export declare class ACMClient extends APIClientBase implements BaseClient {
/**
* cluster-client wrapper client
* set after constructor
*/
constructor(options?: {});
readonly DataClient: typeof DataClient;
readonly clusterOptions: {
name: string;
};
/**
* 订阅
* @param {Object} reg
* - {String} dataId - id of the data you want to subscribe
* - {String} [group] - group name of the data
* - {String} [unit] - which unit you want to connect, default is current unit
* @param {Function} listener - listener
* @return {DiamondClient} self
*/
subscribe(reg: any, listener: any): this;
/**
* 退订
* @param {Object} reg
* - {String} dataId - id of the data you want to subscribe
* - {String} [group] - group name of the data
* - {String} [unit] - which unit you want to connect, default is current unit
* @param {Function} listener - listener
* @return {DiamondClient} self
*/
unSubscribe(reg: any, listener: any): this;
/**
* 获取当前机器所在机房
* @return {String} currentUnit
*/
getCurrentUnit(): Promise<any>;
/**
* 获取所有单元信息
* @return {Array} units
*/
getAllUnits(): Promise<any>;
/**
* 查询租户下的所有的配置
* @return {Array} config
*/
getConfigs(): Promise<any>;
/**
* 获取配置
* @param {String} dataId - id of the data
* @param {String} group - group name of the data
* @param {Object} options
* - {Stirng} unit - which unit you want to connect, default is current unit
* @return {String} value
*/
getConfig(dataId: any, group: any, options?: any): Promise<any>;
/**
* 发布配置
* @param {String} dataId - id of the data
* @param {String} group - group name of the data
* @param {String} content - config value
* @param {Object} options
* - {Stirng} unit - which unit you want to connect, default is current unit
* @return {Boolean} success
*/
publishSingle(dataId: any, group: any, content: any, options?: any): Promise<any>;
/**
* 删除配置
* @param {String} dataId - id of the data
* @param {String} group - group name of the data
* @param {Object} options
* - {Stirng} unit - which unit you want to connect, default is current unit
* @return {Boolean} success
*/
remove(dataId: any, group: any, options?: any): Promise<any>;
/**
* 批量获取配置
* @param {Array} dataIds - data id array
* @param {String} group - group name of the data
* @param {Object} options
* - {Stirng} unit - which unit you want to connect, default is current unit
* @return {Array} result
*/
batchGetConfig(dataIds: any, group: any, options?: any): Promise<any>;
/**
* 批量查询
* @param {Array} dataIds - data id array
* @param {String} group - group name of the data
* @param {Object} options
* - {Stirng} unit - which unit you want to connect, default is current unit
* @return {Object} result
*/
batchQuery(dataIds: any, group: any, options?: any): Promise<any>;
/**
* 将配置发布到所有单元
* @param {String} dataId - id of the data
* @param {String} group - group name of the data
* @param {String} content - config value
* @return {Boolean} success
*/
publishToAllUnit(dataId: any, group: any, content?: any): Promise<any>;
/**
* 将配置从所有单元中删除
* @param {String} dataId - id of the data
* @param {String} group - group name of the data
* @return {Boolean} success
*/
removeToAllUnit(dataId: any, group: any): Promise<any>;
publishAggr(dataId: any, group: any, datumId: any, content: any, options: any): Promise<any>;
removeAggr(dataId: any, group: any, datumId: any, options: any): Promise<any>;
close(): any;
static readonly DataClient: typeof DataClient;
}
export {};