From 5eed5ec3ba59d9610c38c1b6d9b48057bc60302c Mon Sep 17 00:00:00 2001 From: zirain Date: Tue, 5 Apr 2022 01:14:26 +0800 Subject: [PATCH] cache: make APITypePrefix global (#553) * make ApiTypePrefix accessible Signed-off-by: hejianpeng --- pkg/resource/v3/resource.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/resource/v3/resource.go b/pkg/resource/v3/resource.go index ab5863f0f9..696b10b59a 100644 --- a/pkg/resource/v3/resource.go +++ b/pkg/resource/v3/resource.go @@ -14,16 +14,16 @@ type Type = string // Resource types in xDS v3. const ( - apiTypePrefix = "type.googleapis.com/" - EndpointType = apiTypePrefix + "envoy.config.endpoint.v3.ClusterLoadAssignment" - ClusterType = apiTypePrefix + "envoy.config.cluster.v3.Cluster" - RouteType = apiTypePrefix + "envoy.config.route.v3.RouteConfiguration" - ScopedRouteType = apiTypePrefix + "envoy.config.route.v3.ScopedRouteConfiguration" - VirtualHostType = apiTypePrefix + "envoy.config.route.v3.VirtualHost" - ListenerType = apiTypePrefix + "envoy.config.listener.v3.Listener" - SecretType = apiTypePrefix + "envoy.extensions.transport_sockets.tls.v3.Secret" - ExtensionConfigType = apiTypePrefix + "envoy.config.core.v3.TypedExtensionConfig" - RuntimeType = apiTypePrefix + "envoy.service.runtime.v3.Runtime" + APITypePrefix = "type.googleapis.com/" + EndpointType = APITypePrefix + "envoy.config.endpoint.v3.ClusterLoadAssignment" + ClusterType = APITypePrefix + "envoy.config.cluster.v3.Cluster" + RouteType = APITypePrefix + "envoy.config.route.v3.RouteConfiguration" + ScopedRouteType = APITypePrefix + "envoy.config.route.v3.ScopedRouteConfiguration" + VirtualHostType = APITypePrefix + "envoy.config.route.v3.VirtualHost" + ListenerType = APITypePrefix + "envoy.config.listener.v3.Listener" + SecretType = APITypePrefix + "envoy.extensions.transport_sockets.tls.v3.Secret" + ExtensionConfigType = APITypePrefix + "envoy.config.core.v3.TypedExtensionConfig" + RuntimeType = APITypePrefix + "envoy.service.runtime.v3.Runtime" // AnyType is used only by ADS AnyType = ""