dubbo consumer change register => registry
diff --git a/examples/hello-egg/app/dubbo/index.ts b/examples/hello-egg/app/dubbo/index.ts
index 21c2fb7..e8aa25c 100644
--- a/examples/hello-egg/app/dubbo/index.ts
+++ b/examples/hello-egg/app/dubbo/index.ts
@@ -42,7 +42,7 @@
// create a dubboo object
const dubbo = new Dubbo<typeof service>({
application: {name: 'node-egg-bff'},
- register: 'localhost:2181,localhost:2182,localhost:2183',
+ registry: 'localhost:2181,localhost:2182,localhost:2183',
service,
dubboSetting,
});
diff --git a/examples/hello-koa/src/dubbo/consumer/dubbo.ts b/examples/hello-koa/src/dubbo/consumer/dubbo.ts
index 25e0f20..b1277a0 100644
--- a/examples/hello-koa/src/dubbo/consumer/dubbo.ts
+++ b/examples/hello-koa/src/dubbo/consumer/dubbo.ts
@@ -43,7 +43,7 @@
service,
dubboSetting,
// default zookeeper
- register: `localhost:2181`,
+ registry: `localhost:2181`,
// register: nacos({
// url: 'nacos:localhost:8848',
// }),
diff --git a/examples/hello-midway/src/app/dubbo/index.ts b/examples/hello-midway/src/app/dubbo/index.ts
index dc3b83a..7894eda 100644
--- a/examples/hello-midway/src/app/dubbo/index.ts
+++ b/examples/hello-midway/src/app/dubbo/index.ts
@@ -41,10 +41,10 @@
)
.match('org.apache.dubbo.demo.BasicTypeProvider', {version: '2.0.0'});
- const {application, register} = app.config.dubbo;
+ const {application, registry} = app.config.dubbo;
const dubbo = new Dubbo<typeof service>({
application,
- register,
+ registry,
service,
dubboSetting,
});
diff --git a/packages/dubbo/src/consumer/dubbo.ts b/packages/dubbo/src/consumer/dubbo.ts
index aa5a80d..7c06e3e 100644
--- a/packages/dubbo/src/consumer/dubbo.ts
+++ b/packages/dubbo/src/consumer/dubbo.ts
@@ -63,7 +63,7 @@
}
// check dubbo register
- if (!isString(props.register) && !isFunction(props.register)) {
+ if (!isString(props.registry) && !isFunction(props.registry)) {
throw new Error('Dubbo register must be string of function ');
}
@@ -97,14 +97,14 @@
this._initMsgListener();
//if dubbo register is string, create a zookeeper instance
- let register = this._props.register;
+ let register = this._props.registry;
if (isString(register) && register.startsWith('nacos://')) {
register = nacos({
- url: this._props.register as string,
+ url: this._props.registry as string,
});
} else {
register = zk({
- url: this._props.register as string,
+ url: this._props.registry as string,
});
}
log('constructor -> register', register);
diff --git a/packages/dubbo/src/server/server_test.ts b/packages/dubbo/src/server/server_test.ts
index 2325c2b..024d22c 100644
--- a/packages/dubbo/src/server/server_test.ts
+++ b/packages/dubbo/src/server/server_test.ts
@@ -61,7 +61,7 @@
const dubbo = new Dubbo<typeof service>({
application: {name: 'node-consumer'},
- register: 'localhost:2181',
+ registry: 'localhost:2181',
dubboSetting,
service,
});
diff --git a/packages/dubbo/src/types.ts b/packages/dubbo/src/types.ts
index 98753cb..be1f6e0 100644
--- a/packages/dubbo/src/types.ts
+++ b/packages/dubbo/src/types.ts
@@ -90,7 +90,7 @@
export interface IDubboProps {
//当前的应用标识
application: {name: string};
- register: ((props: IDubboConsumerRegistryProps) => Registry) | string;
+ registry: ((props: IDubboConsumerRegistryProps) => Registry) | string;
//当前要注册到dubbo容器的服务对象
service: Object;
dubboSetting: Setting;