Skip to content
Docs Try Aspire
Docs Try

IYarpConfigurationBuilder

Interface
📦 Aspire.Hosting.Yarp v13.3.0
interface IYarpConfigurationBuilder {
addCatchAllRoute(target: ExternalServiceResource|string): YarpRoute;
addClusterFromEndpoint(endpoint: EndpointReference): YarpCluster;
addClusterFromExternalService(externalService: ExternalServiceResource): YarpCluster;
addClusterFromResource(resource: IResourceWithServiceDiscovery): YarpCluster;
addClusterWithDestination(
clusterName: string,
destination: any): YarpCluster;
addClusterWithDestinations(
clusterName: string,
destinations: any[]): YarpCluster;
addRoute(
path: string,
target: ExternalServiceResource|string): YarpRoute;
}

Methods

Adds a YARP catch-all route for a cluster, endpoint, resource, or string destination target.
addCatchAllRoute(target: ExternalServiceResource|string): YarpRoute
target ExternalServiceResource|string
YarpRoute
Adds a YARP cluster for an endpoint reference.
addClusterFromEndpoint(endpoint: EndpointReference): YarpCluster
endpoint EndpointReference
YarpCluster
Adds a YARP cluster for an external service resource.
addClusterFromExternalService(externalService: ExternalServiceResource): YarpCluster
externalService ExternalServiceResource
YarpCluster
Adds a YARP cluster for a resource that supports service discovery.
addClusterFromResource(resource: IResourceWithServiceDiscovery): YarpCluster
resource IResourceWithServiceDiscovery
YarpCluster
Adds a YARP cluster with a single destination.
addClusterWithDestination(
clusterName: string,
destination: any): YarpCluster
clusterName string
destination any
YarpCluster
Adds a YARP cluster with multiple destinations.
addClusterWithDestinations(
clusterName: string,
destinations: any[]): YarpCluster
clusterName string
destinations any[]
YarpCluster
method addRoute
Adds a YARP route for a cluster, endpoint, resource, or string destination target.
addRoute(
path: string,
target: ExternalServiceResource|string): YarpRoute
path string
target ExternalServiceResource|string
YarpRoute