import { Rule } from '@nestcloud/loadbalance' ; import { ILoadbalancer , IServer } from '@nestcloud/common' ; import { Injectable } from '@nestjs/common' ; @ Injectable ( ) export class CustomLoadbalanceRule implements Rule { private loadbalancer : ILoadbalancer ; choose ( ) { return this . loadbalancer . servers [ 0 ] ; } init ( loadbalancer ) { this . loadbalancer = loadbalancer ; } }