Interface ILoadBalancer
Namespace: Steeltoe.Common.LoadBalancer
Assembly: Steeltoe.Common.dll
Syntax
public interface ILoadBalancer
Methods
| Edit this page View SourceResolveServiceInstanceAsync(Uri)
Evaluates a Uri for a host name that can be resolved into a service instance
Declaration
Task<Uri> ResolveServiceInstanceAsync(Uri request)
Parameters
Type | Name | Description |
---|---|---|
Uri | request | A Uri containing a service name that can be resolved into one or more service instances |
Returns
Type | Description |
---|---|
Task<Uri> | The original Uri, with serviceName replaced by the host:port of a service instance |
UpdateStatsAsync(Uri, Uri, TimeSpan, Exception)
A mechanism for tracking statistics for service instances
Declaration
Task UpdateStatsAsync(Uri originalUri, Uri resolvedUri, TimeSpan responseTime, Exception exception)
Parameters
Type | Name | Description |
---|---|---|
Uri | originalUri | The original request Uri |
Uri | resolvedUri | The Uri resolved by the load balancer |
TimeSpan | responseTime | The amount of time taken for a remote call to complete |
Exception | exception | Any exception called during calls to a resolved service instance |
Returns
Type | Description |
---|---|
Task | A task |