Skip to content
Docs Try Aspire

IYarpConfigurationBuilder Methods

Interface Methods 6 members
Interface to build a configuration file for YARP
AddCluster(EndpointReference) Section titled AddCluster(EndpointReference) abstract YarpCluster
Add a new cluster to YARP.
public interface IYarpConfigurationBuilder
{
public abstract YarpCluster AddCluster(
EndpointReference endpoint)
{
// ...
}
}
endpoint EndpointReference The endpoint target for this cluster.
AddCluster(IResourceBuilder<IResourceWithServiceDiscovery>) Section titled AddCluster(IResourceBuilder<IResourceWithServiceDiscovery>) abstract YarpCluster
Add a new cluster to YARP based on a resource that supports service discovery.
public interface IYarpConfigurationBuilder
{
public abstract YarpCluster AddCluster(
IResourceBuilder<IResourceWithServiceDiscovery> resource)
{
// ...
}
}
resource IResourceBuilder<IResourceWithServiceDiscovery> The resource target for this cluster.
AddCluster(IResourceBuilder<ExternalServiceResource>) Section titled AddCluster(IResourceBuilder<ExternalServiceResource>) abstract YarpCluster
Add a new cluster to YARP based on an external service resource.
public interface IYarpConfigurationBuilder
{
public abstract YarpCluster AddCluster(
IResourceBuilder<ExternalServiceResource> externalService)
{
// ...
}
}
externalService IResourceBuilder<ExternalServiceResource> The external service used by this cluster.
AddCluster(string, object[]) Section titled AddCluster(string, object[]) abstract YarpCluster
Add a new cluster to YARP based on a collection of urls.
public interface IYarpConfigurationBuilder
{
public abstract YarpCluster AddCluster(
string clusterName,
object[] destinations)
{
// ...
}
}
clusterName string The name of the cluster.
destinations object[] The destinations used by this cluster.
AddCluster(string, object) Section titled AddCluster(string, object) virtual YarpCluster
Add a new cluster to YARP based on a collection of urls.
public interface IYarpConfigurationBuilder
{
public virtual YarpCluster AddCluster(
string clusterName,
object destination)
{
// ...
}
}
clusterName string The name of the cluster.
destination object The destinations used by this cluster.
AddRoute(string, YarpCluster) Section titled AddRoute(string, YarpCluster) abstract YarpRoute
Add a new route to YARP that will target the cluster in parameter.
public interface IYarpConfigurationBuilder
{
public abstract YarpRoute AddRoute(
string path,
YarpCluster cluster)
{
// ...
}
}
path string The path to match for this route.
cluster YarpCluster The target cluster for this route.