Search in sources :

Example 6 with PolarisServer

use of com.tencent.cloud.common.pojo.PolarisServer in project spring-cloud-tencent by Tencent.

the class PolarisLoadBalancerCompositeRuleTest method assembleServers.

private List<Server> assembleServers() {
    ServiceInstances serviceInstances = assembleServiceInstances();
    List<Server> servers = new LinkedList<>();
    servers.add(new PolarisServer(serviceInstances, new DefaultInstance()));
    servers.add(new PolarisServer(serviceInstances, new DefaultInstance()));
    servers.add(new PolarisServer(serviceInstances, new DefaultInstance()));
    servers.add(new PolarisServer(serviceInstances, new DefaultInstance()));
    return servers;
}
Also used : DefaultServiceInstances(com.tencent.polaris.api.pojo.DefaultServiceInstances) ServiceInstances(com.tencent.polaris.api.pojo.ServiceInstances) Server(com.netflix.loadbalancer.Server) PolarisServer(com.tencent.cloud.common.pojo.PolarisServer) DefaultInstance(com.tencent.polaris.api.pojo.DefaultInstance) PolarisServer(com.tencent.cloud.common.pojo.PolarisServer) LinkedList(java.util.LinkedList)

Aggregations

Server (com.netflix.loadbalancer.Server)6 PolarisServer (com.tencent.cloud.common.pojo.PolarisServer)6 Instance (com.tencent.polaris.api.pojo.Instance)5 ServiceInstances (com.tencent.polaris.api.pojo.ServiceInstances)5 DefaultServiceInstances (com.tencent.polaris.api.pojo.DefaultServiceInstances)3 ArrayList (java.util.ArrayList)3 DefaultInstance (com.tencent.polaris.api.pojo.DefaultInstance)2 LinkedList (java.util.LinkedList)2 ServiceKey (com.tencent.polaris.api.pojo.ServiceKey)1 InstancesResponse (com.tencent.polaris.api.rpc.InstancesResponse)1 ProcessLoadBalanceRequest (com.tencent.polaris.router.api.rpc.ProcessLoadBalanceRequest)1 ProcessLoadBalanceResponse (com.tencent.polaris.router.api.rpc.ProcessLoadBalanceResponse)1 ProcessRoutersRequest (com.tencent.polaris.router.api.rpc.ProcessRoutersRequest)1 ProcessRoutersResponse (com.tencent.polaris.router.api.rpc.ProcessRoutersResponse)1