IYarpConfigurationBuilder Methods
InterfaceMethods6 members
Interface to build a configuration file for YARP
Add a new cluster to YARP.
public interface IYarpConfigurationBuilder{ public abstract YarpCluster AddCluster( EndpointReference endpoint) { // ... }}Parameters
endpointEndpointReferenceThe endpoint target for this cluster.Returns
YarpClusterThe created cluster for further configuration.Remarks
This overload is not available in polyglot app hosts. Use the
addClusterFromEndpoint helper instead.AddCluster(IResourceBuilder<IResourceWithServiceDiscovery>)Section titled AddCluster(IResourceBuilder<IResourceWithServiceDiscovery>)abstractYarpCluster Add a new cluster to YARP based on a resource that supports service discovery.
public interface IYarpConfigurationBuilder{ public abstract YarpCluster AddCluster( IResourceBuilder<IResourceWithServiceDiscovery> resource) { // ... }}Parameters
resourceIResourceBuilder<IResourceWithServiceDiscovery>The resource target for this cluster.Returns
YarpClusterThe created cluster for further configuration.Remarks
This overload is not available in polyglot app hosts. Use the
addClusterFromResource helper instead.AddCluster(IResourceBuilder<ExternalServiceResource>)Section titled AddCluster(IResourceBuilder<ExternalServiceResource>)abstractYarpCluster Add a new cluster to YARP based on an external service resource.
public interface IYarpConfigurationBuilder{ public abstract YarpCluster AddCluster( IResourceBuilder<ExternalServiceResource> externalService) { // ... }}Parameters
externalServiceIResourceBuilder<ExternalServiceResource>The external service used by this cluster.Returns
YarpClusterThe created cluster for further configuration.Remarks
This overload is not available in polyglot app hosts. Use the
addClusterFromExternalService helper instead. Add a new cluster to YARP based on a collection of urls.
public interface IYarpConfigurationBuilder{ public abstract YarpCluster AddCluster( string clusterName, object[] destinations) { // ... }}Parameters
clusterNamestringThe name of the cluster.destinationsobject[]The destinations used by this cluster.Returns
YarpClusterThe created cluster for further configuration.Remarks
This overload is not available in polyglot app hosts. Use the
addClusterWithDestinations helper instead. Add a new cluster to YARP based on a collection of urls.
public interface IYarpConfigurationBuilder{ public virtual YarpCluster AddCluster( string clusterName, object destination) { // ... }}Parameters
clusterNamestringThe name of the cluster.destinationobjectThe destinations used by this cluster.Returns
YarpClusterThe created cluster for further configuration.Remarks
This overload is not available in polyglot app hosts. Use the
addClusterWithDestination helper instead. Add a new route to YARP that will target the cluster in parameter.
public interface IYarpConfigurationBuilder{ public abstract YarpRoute AddRoute( string path, YarpCluster cluster) { // ... }}Parameters
pathstringThe path to match for this route.clusterYarpClusterThe target cluster for this route.Returns
YarpRouteThe created route for further configuration.