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