YarpConfigurationBuilder
Interface to build a configuration file for YARP
type YarpConfigurationBuilder interface{}Methods
AddCatchAllRoute AddCatchAllRoute(target any) YarpRouteParameters
targetanyThe target cluster, endpoint, resource, or string destination for this route.Returns
YarpRoute The created route.
Returns a handle; failures surface later via Err().
AddClusterFromEndpoint AddClusterFromEndpoint(endpoint EndpointReference) YarpClusterParameters
endpointEndpointReference The endpoint target for this cluster.Returns
YarpCluster The created cluster.
Returns a handle; failures surface later via Err().
AddClusterFromExternalService(externalService ExternalServiceResource) YarpClusterParameters
externalService ExternalServiceResource The external service used by this cluster.Returns
YarpCluster The created cluster.
Returns a handle; failures surface later via Err().
AddClusterFromResource AddClusterFromResource(resource ResourceWithServiceDiscovery) YarpClusterParameters
resourceResourceWithServiceDiscovery The resource target for this cluster.Returns
YarpCluster The created cluster.
Returns a handle; failures surface later via Err().
AddClusterWithDestination( clusterName string, destination any,) YarpClusterParameters
clusterName stringThe name of the cluster.destinationanyThe destination used by this cluster.Returns
YarpCluster The created cluster.
Returns a handle; failures surface later via Err().
AddClusterWithDestinations( clusterName string, destinations []any,) YarpClusterParameters
clusterName stringThe name of the cluster.destinations[]any The destinations used by this cluster.Returns
YarpCluster The created cluster.
Returns a handle; failures surface later via Err().
AddRoute AddRoute( path string, target any,) YarpRouteParameters
pathstringThe path to match for this route.targetanyThe target cluster, endpoint, resource, or string destination for this route.Returns
YarpRoute The created route.
Returns a handle; failures surface later via Err().
Applies to
This interface applies to the following types: