mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 22:08:17 +08:00
Add 'Name' property to ILoadBalancer, for future use in LoadBalancerFactory.
This commit is contained in:
@ -84,5 +84,7 @@ namespace Ocelot.LoadBalancer.LoadBalancers
|
||||
public void Release(ServiceHostAndPort hostAndPort)
|
||||
{
|
||||
}
|
||||
|
||||
public string Name => GetType().Name;
|
||||
}
|
||||
}
|
||||
|
@ -10,5 +10,7 @@ namespace Ocelot.LoadBalancer.LoadBalancers
|
||||
Task<Response<ServiceHostAndPort>> Lease(DownstreamContext context);
|
||||
|
||||
void Release(ServiceHostAndPort hostAndPort);
|
||||
|
||||
string Name { get; }
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,8 @@ namespace Ocelot.LoadBalancer.LoadBalancers
|
||||
}
|
||||
}
|
||||
|
||||
public string Name => GetType().Name;
|
||||
|
||||
private Lease AddConnection(Lease lease)
|
||||
{
|
||||
return new Lease(lease.HostAndPort, lease.Connections + 1);
|
||||
|
@ -33,5 +33,7 @@ namespace Ocelot.LoadBalancer.LoadBalancers
|
||||
public void Release(ServiceHostAndPort hostAndPort)
|
||||
{
|
||||
}
|
||||
|
||||
public string Name => GetType().Name;
|
||||
}
|
||||
}
|
||||
|
@ -38,5 +38,7 @@ namespace Ocelot.LoadBalancer.LoadBalancers
|
||||
public void Release(ServiceHostAndPort hostAndPort)
|
||||
{
|
||||
}
|
||||
|
||||
public string Name => GetType().Name;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user