Skip to content

Commit

Permalink
cache: make APITypePrefix global (#553)
Browse files Browse the repository at this point in the history
* make ApiTypePrefix accessible

Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
  • Loading branch information
zirain authored Apr 4, 2022
1 parent 6a52591 commit 5eed5ec
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions pkg/resource/v3/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit 5eed5ec

Please sign in to comment.