14 instantiations of YarpCluster
Aspire.Hosting.Yarp (4)
ConfigurationBuilder\YarpConfigurationBuilder.cs (4)
29
var destination = new
YarpCluster
(endpoint);
38
var destination = new
YarpCluster
(resource.Resource);
47
var destination = new
YarpCluster
(externalService.Resource);
75
var destination = new
YarpCluster
(clusterName, destinations);
Aspire.Hosting.Yarp.Tests (10)
YarpClusterTests.cs (8)
14
var cluster = new
YarpCluster
("raw_cluster", "http://localhost:5000", "https://localhost:5001");
30
var httpCluster = new
YarpCluster
(httpEndpoint);
33
var httpsCluster = new
YarpCluster
(httpsEndpoint);
48
var httpCluster = new
YarpCluster
(httpEndpoint);
51
var httpsCluster = new
YarpCluster
(httpsEndpoint);
64
var httpCluster = new
YarpCluster
(httpService.Resource);
71
var httpsCluster = new
YarpCluster
(httpsService.Resource);
83
var clusterA = new
YarpCluster
(serviceA.Resource);
YarpConfigGeneratorTests.cs (2)
235
_validClusters.Select(c => new
YarpCluster
(c, c.Destinations!.First().Value.Address)).ToList());
254
_validClusters.Select(c => new
YarpCluster
(c, c.Destinations!.First().Value.Address)).ToList());
52 references to YarpCluster
Aspire.Hosting.Yarp (37)
ConfigurationBuilder\IYarpConfigurationBuilder.cs (10)
20
public YarpRoute AddRoute(string path,
YarpCluster
cluster);
27
public
YarpCluster
AddCluster(EndpointReference endpoint);
34
public
YarpCluster
AddCluster(IResourceBuilder<IResourceWithServiceDiscovery> resource);
41
public
YarpCluster
AddCluster(IResourceBuilder<ExternalServiceResource> externalService);
49
public
YarpCluster
AddCluster(string clusterName, object[] destinations);
57
public
YarpCluster
AddCluster(string clusterName, object destination)
76
public static YarpRoute AddRoute(this IYarpConfigurationBuilder builder,
YarpCluster
cluster)
112
var
cluster = builder.AddCluster(endpoint);
125
var
cluster = builder.AddCluster(resource);
138
var
cluster = builder.AddCluster(externalService);
ConfigurationBuilder\YarpCluster.cs (14)
40
/// Creates a new instance of <see cref="
YarpCluster
"/> with a specified external service resource.
49
/// Creates a new instance of <see cref="
YarpCluster
"/> with a specified list of addresses.
115
public static
YarpCluster
WithForwarderRequestConfig(this
YarpCluster
cluster, ForwarderRequestConfig config)
124
public static
YarpCluster
WithHttpClientConfig(this
YarpCluster
cluster, HttpClientConfig config)
133
public static
YarpCluster
WithSessionAffinityConfig(this
YarpCluster
cluster, SessionAffinityConfig config)
142
public static
YarpCluster
WithHealthCheckConfig(this
YarpCluster
cluster, HealthCheckConfig config)
151
public static
YarpCluster
WithLoadBalancingPolicy(this
YarpCluster
cluster, string policy)
160
public static
YarpCluster
WithMetadata(this
YarpCluster
cluster, IReadOnlyDictionary<string, string> metadata)
ConfigurationBuilder\YarpConfigurationBuilder.cs (9)
14
public YarpRoute AddRoute(string path,
YarpCluster
cluster)
27
public
YarpCluster
AddCluster(EndpointReference endpoint)
29
var
destination = new YarpCluster(endpoint);
36
public
YarpCluster
AddCluster(IResourceBuilder<IResourceWithServiceDiscovery> resource)
38
var
destination = new YarpCluster(resource.Resource);
45
public
YarpCluster
AddCluster(IResourceBuilder<ExternalServiceResource> externalService)
47
var
destination = new YarpCluster(externalService.Resource);
54
public
YarpCluster
AddCluster(string clusterName, object[] destinations)
75
var
destination = new YarpCluster(clusterName, destinations);
ConfigurationBuilder\YarpRoute.cs (1)
19
internal YarpRoute(
YarpCluster
cluster, string routeId)
YarpEnvConfigGenerator.cs (2)
15
public static void PopulateEnvVariables(Dictionary<string, object> environmentVariables, List<YarpRoute> routes, List<
YarpCluster
> clusters)
25
foreach (
var
cluster in clusters)
YarpResource.cs (1)
16
internal List<
YarpCluster
> Clusters { get; } = new ();
Aspire.Hosting.Yarp.Tests (14)
YarpClusterTests.cs (13)
14
var
cluster = new YarpCluster("raw_cluster", "http://localhost:5000", "https://localhost:5001");
30
var
httpCluster = new YarpCluster(httpEndpoint);
33
var
httpsCluster = new YarpCluster(httpsEndpoint);
48
var
httpCluster = new YarpCluster(httpEndpoint);
51
var
httpsCluster = new YarpCluster(httpsEndpoint);
64
var
httpCluster = new YarpCluster(httpService.Resource);
71
var
httpsCluster = new YarpCluster(httpsService.Resource);
83
var
clusterA = new YarpCluster(serviceA.Resource);
95
var
cluster = config.AddCluster("test-cluster", (object)"http://localhost:5000");
111
var
cluster = config.AddCluster("test-cluster", (object)uri);
127
var
cluster = config.AddCluster("test-cluster", destinations);
194
var
cluster = config.AddCluster("test-cluster", new object[] { "http://localhost:5000", uri, refExpr });
209
var
cluster = config.AddCluster("test-cluster", (object)"http://localhost:5000");
YarpConfigGeneratorTests.cs (1)
280
var
backendCluster = yarp.AddCluster(backend.GetEndpoint("http"))
ExternalServices.AppHost (1)
AppHost.cs (1)
29
var
nugetCluster = c.AddCluster(nuget);