in grpc-xds/control-plane-go/pkg/xds/rds/route_api.go [27:53]
func CreateRouteConfigurationForAPIListener(name string, virtualHostName string, routePrefix string, clusterName string) *routev3.RouteConfiguration {
return &routev3.RouteConfiguration{
Name: name,
VirtualHosts: []*routev3.VirtualHost{
{
Name: virtualHostName,
Domains: []string{"*"},
Routes: []*routev3.Route{
{
Match: &routev3.RouteMatch{
PathSpecifier: &routev3.RouteMatch_Prefix{
Prefix: routePrefix,
},
},
Action: &routev3.Route_Route{
Route: &routev3.RouteAction{
ClusterSpecifier: &routev3.RouteAction_Cluster{
Cluster: clusterName,
},
},
},
},
},
},
},
}
}