def get_lb(self, eps: List[EndPoint]) -> Union[RoundrobinLB, RandomLB]: name = self.url.get_param("loadBalance", "RoundrobinLB") if name == "RandomLB": return RandomLB(self.url, eps) elif name == "RoundrobinLB": return RoundrobinLB(self.url, eps) raise ReferCfgError
def lb(): url = URL("127.0.0.1", 4399, "") ep = EndPoint(url) return RandomLB(url, [ep])
def get_lb(self, eps): name = self.url.get_param("loadBalance", "RoundrobinLB") if name == "RandomLB": return RandomLB(self.url, eps) elif name == "RoundrobinLB": return RoundrobinLB(self.url, eps)
def get_lb(self, eps): name = self.url.get_param('loadbalance', 'RoundrobinLB') if name == "RandomLB": return RandomLB(self.url, eps) elif name == "RoundrobinLB": return RoundrobinLB(self.url, eps)