diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2024-01-30 11:20:39 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2024-01-30 12:12:51 +0300 |
commit | be737fd8956853e06bd2c4f9fcd4a85188f4c172 (patch) | |
tree | 5bd76802fac1096dfd90983c7739d50de367a79f /vendor/github.com/envoyproxy/go-control-plane/pkg/cache/v3/resource.go | |
parent | fe62880c46b1f2c9fec779b0dc39f8a92ce256a5 (diff) | |
download | ydb-be737fd8956853e06bd2c4f9fcd4a85188f4c172.tar.gz |
Update vendor/github.com/envoyproxy/go-control-plane to 0.12.0
Diffstat (limited to 'vendor/github.com/envoyproxy/go-control-plane/pkg/cache/v3/resource.go')
-rw-r--r-- | vendor/github.com/envoyproxy/go-control-plane/pkg/cache/v3/resource.go | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/vendor/github.com/envoyproxy/go-control-plane/pkg/cache/v3/resource.go b/vendor/github.com/envoyproxy/go-control-plane/pkg/cache/v3/resource.go index ea57e4714a..d4c25f2a11 100644 --- a/vendor/github.com/envoyproxy/go-control-plane/pkg/cache/v3/resource.go +++ b/vendor/github.com/envoyproxy/go-control-plane/pkg/cache/v3/resource.go @@ -22,15 +22,12 @@ import ( "google.golang.org/protobuf/proto" cluster "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3" - core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" endpoint "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" listener "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" route "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" - auth "github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3" runtime "github.com/envoyproxy/go-control-plane/envoy/service/runtime/v3" "github.com/envoyproxy/go-control-plane/pkg/cache/types" "github.com/envoyproxy/go-control-plane/pkg/resource/v3" - ratelimit "github.com/envoyproxy/go-control-plane/ratelimit/config/ratelimit/v3" ) // GetResponseType returns the enumeration for a valid xDS type URL. @@ -93,24 +90,6 @@ func GetResourceName(res types.Resource) string { switch v := res.(type) { case *endpoint.ClusterLoadAssignment: return v.GetClusterName() - case *cluster.Cluster: - return v.GetName() - case *route.RouteConfiguration: - return v.GetName() - case *route.ScopedRouteConfiguration: - return v.GetName() - case *route.VirtualHost: - return v.GetName() - case *listener.Listener: - return v.GetName() - case *auth.Secret: - return v.GetName() - case *runtime.Runtime: - return v.GetName() - case *core.TypedExtensionConfig: - return v.GetName() - case *ratelimit.RateLimitConfig: - return v.GetName() case types.ResourceWithName: return v.GetName() default: @@ -197,13 +176,13 @@ func mapMerge(dst map[string]bool, src map[string]bool) { func getClusterReferences(src *cluster.Cluster, out map[resource.Type]map[string]bool) { endpoints := map[string]bool{} - switch typ := src.ClusterDiscoveryType.(type) { + switch typ := src.GetClusterDiscoveryType().(type) { case *cluster.Cluster_Type: if typ.Type == cluster.Cluster_EDS { - if src.EdsClusterConfig != nil && src.EdsClusterConfig.ServiceName != "" { - endpoints[src.EdsClusterConfig.ServiceName] = true + if src.GetEdsClusterConfig() != nil && src.GetEdsClusterConfig().GetServiceName() != "" { + endpoints[src.GetEdsClusterConfig().GetServiceName()] = true } else { - endpoints[src.Name] = true + endpoints[src.GetName()] = true } } } @@ -222,8 +201,8 @@ func getListenerReferences(src *listener.Listener, out map[resource.Type]map[str routes := map[string]bool{} // Extract route configuration names from HTTP connection manager. - for _, chain := range src.FilterChains { - for _, filter := range chain.Filters { + for _, chain := range src.GetFilterChains() { + for _, filter := range chain.GetFilters() { config := resource.GetHTTPConnectionManager(filter) if config == nil { continue @@ -236,7 +215,7 @@ func getListenerReferences(src *listener.Listener, out map[resource.Type]map[str // If the scoped route mapping is embedded, add the referenced route resource names. for _, s := range config.GetScopedRoutes().GetScopedRouteConfigurationsList().GetScopedRouteConfigurations() { - routes[s.RouteConfigurationName] = true + routes[s.GetRouteConfigurationName()] = true } } } @@ -254,7 +233,7 @@ func getScopedRouteReferences(src *route.ScopedRouteConfiguration, out map[resou routes := map[string]bool{} // For a scoped route configuration, the dependent resource is the RouteConfigurationName. - routes[src.RouteConfigurationName] = true + routes[src.GetRouteConfigurationName()] = true if len(routes) > 0 { if _, ok := out[resource.RouteType]; !ok { |