@weamd/loadbalancer
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@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;
  }
}    

Readme

Keywords

none

Package Sidebar

Install

npm i @weamd/loadbalancer

Weekly Downloads

2

Version

1.2.0

License

MIT

Unpacked Size

47.9 kB

Total Files

17

Last publish

Collaborators

  • zj22818