MCPcopy Create free account
hub / github.com/2YSP/ship-gate / LoadBalance

Interface LoadBalance

ship-server/src/main/java/cn/sp/spi/LoadBalance.java:10–17  ·  view source on GitHub ↗

Created by 2YSP on 2020/12/27

Source from the content-addressed store, hash-verified

8 * Created by 2YSP on 2020/12/27
9 */
10public interface LoadBalance {
11 /**
12 * Select an instance based on the load balancing algorithm
13 * @param instances
14 * @return
15 */
16 ServiceInstance chooseOne(List<ServiceInstance> instances);
17}

Callers 1

chooseInstanceMethod · 0.95

Implementers 3

WeightRoundBalanceship-server/src/main/java/cn/sp/spi/ba
RandomBalanceship-server/src/main/java/cn/sp/spi/ba
FullRoundBalanceship-server/src/main/java/cn/sp/spi/ba

Calls

no outgoing calls

Tested by

no test coverage detected