@weamd/loadbalancer
v1.2.0
Published
与 `@weamd/nacosdiscovery` 搭配使用
Downloads
20
Readme
@weamd/loadbalancer
与 @weamd/nacosdiscovery
搭配使用
其他注册中心待支持
install
yarn add @weamd/loadbalancer @weamd/nacosdiscovery
example
import { RestTemplate, LoadBalancer } from '@weamd/loadbalancer';
class DemoClass {
@LoadBalancer()
restTemplate: RestTemplate;
async getDocHealthy(){
const res = await this.restTemplate.request('lb://weaver-doc-service/remote/health.jsp');
return res;
}
}