From 610826337a80548abd4c3f5da7d890c0a3a0402e Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Tue, 1 Aug 2023 16:10:51 -0500 Subject: [PATCH] mesh: adding the protobuf types and resources backing mesh config v2 --- internal/catalog/exports.go | 14 + .../catalog/internal/types/failover_policy.go | 33 + internal/catalog/internal/types/types.go | 1 + internal/mesh/exports.go | 29 +- .../mesh/internal/types/computed_routes.go | 32 + .../mesh/internal/types/destination_policy.go | 32 + internal/mesh/internal/types/grpc_route.go | 32 + internal/mesh/internal/types/http_route.go | 32 + internal/mesh/internal/types/tcp_route.go | 32 + internal/mesh/internal/types/types.go | 5 + .../v1alpha1/failover_policy.pb.binary.go | 38 + .../pbcatalog/v1alpha1/failover_policy.pb.go | 457 ++++++ .../pbcatalog/v1alpha1/failover_policy.proto | 47 + .../pbcatalog/v1alpha1/selector.pb.go | 53 +- .../pbcatalog/v1alpha1/selector.proto | 1 + .../pbmesh/v1alpha1/common.pb.binary.go | 28 + proto-public/pbmesh/v1alpha1/common.pb.go | 307 ++++ proto-public/pbmesh/v1alpha1/common.proto | 64 + .../v1alpha1/computed_routes.pb.binary.go | 128 ++ .../pbmesh/v1alpha1/computed_routes.pb.go | 1321 +++++++++++++++ .../pbmesh/v1alpha1/computed_routes.proto | 99 ++ proto-public/pbmesh/v1alpha1/connection.pb.go | 126 +- proto-public/pbmesh/v1alpha1/connection.proto | 8 +- .../v1alpha1/destination_policy.pb.binary.go | 88 + .../pbmesh/v1alpha1/destination_policy.pb.go | 1091 +++++++++++++ .../pbmesh/v1alpha1/destination_policy.proto | 147 ++ .../pbmesh/v1alpha1/grpc_route.pb.binary.go | 78 + proto-public/pbmesh/v1alpha1/grpc_route.pb.go | 887 ++++++++++ proto-public/pbmesh/v1alpha1/grpc_route.proto | 121 ++ .../pbmesh/v1alpha1/http_route.pb.binary.go | 118 ++ proto-public/pbmesh/v1alpha1/http_route.pb.go | 1441 +++++++++++++++++ proto-public/pbmesh/v1alpha1/http_route.proto | 259 +++ .../v1alpha1/http_route_retries.pb.binary.go | 18 + .../pbmesh/v1alpha1/http_route_retries.pb.go | 206 +++ .../pbmesh/v1alpha1/http_route_retries.proto | 25 + .../v1alpha1/http_route_timeouts.pb.binary.go | 18 + .../pbmesh/v1alpha1/http_route_timeouts.pb.go | 223 +++ .../pbmesh/v1alpha1/http_route_timeouts.proto | 41 + .../v1alpha1/proxy_configuration.pb.binary.go | 20 + .../pbmesh/v1alpha1/proxy_configuration.pb.go | 710 ++++++-- .../pbmesh/v1alpha1/proxy_configuration.proto | 74 +- .../pbmesh/v1alpha1/tcp_route.pb.binary.go | 38 + proto-public/pbmesh/v1alpha1/tcp_route.pb.go | 362 +++++ proto-public/pbmesh/v1alpha1/tcp_route.proto | 56 + 44 files changed, 8688 insertions(+), 252 deletions(-) create mode 100644 internal/catalog/internal/types/failover_policy.go create mode 100644 internal/mesh/internal/types/computed_routes.go create mode 100644 internal/mesh/internal/types/destination_policy.go create mode 100644 internal/mesh/internal/types/grpc_route.go create mode 100644 internal/mesh/internal/types/http_route.go create mode 100644 internal/mesh/internal/types/tcp_route.go create mode 100644 proto-public/pbcatalog/v1alpha1/failover_policy.pb.binary.go create mode 100644 proto-public/pbcatalog/v1alpha1/failover_policy.pb.go create mode 100644 proto-public/pbcatalog/v1alpha1/failover_policy.proto create mode 100644 proto-public/pbmesh/v1alpha1/common.pb.binary.go create mode 100644 proto-public/pbmesh/v1alpha1/common.pb.go create mode 100644 proto-public/pbmesh/v1alpha1/common.proto create mode 100644 proto-public/pbmesh/v1alpha1/computed_routes.pb.binary.go create mode 100644 proto-public/pbmesh/v1alpha1/computed_routes.pb.go create mode 100644 proto-public/pbmesh/v1alpha1/computed_routes.proto create mode 100644 proto-public/pbmesh/v1alpha1/destination_policy.pb.binary.go create mode 100644 proto-public/pbmesh/v1alpha1/destination_policy.pb.go create mode 100644 proto-public/pbmesh/v1alpha1/destination_policy.proto create mode 100644 proto-public/pbmesh/v1alpha1/grpc_route.pb.binary.go create mode 100644 proto-public/pbmesh/v1alpha1/grpc_route.pb.go create mode 100644 proto-public/pbmesh/v1alpha1/grpc_route.proto create mode 100644 proto-public/pbmesh/v1alpha1/http_route.pb.binary.go create mode 100644 proto-public/pbmesh/v1alpha1/http_route.pb.go create mode 100644 proto-public/pbmesh/v1alpha1/http_route.proto create mode 100644 proto-public/pbmesh/v1alpha1/http_route_retries.pb.binary.go create mode 100644 proto-public/pbmesh/v1alpha1/http_route_retries.pb.go create mode 100644 proto-public/pbmesh/v1alpha1/http_route_retries.proto create mode 100644 proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.binary.go create mode 100644 proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.go create mode 100644 proto-public/pbmesh/v1alpha1/http_route_timeouts.proto create mode 100644 proto-public/pbmesh/v1alpha1/tcp_route.pb.binary.go create mode 100644 proto-public/pbmesh/v1alpha1/tcp_route.pb.go create mode 100644 proto-public/pbmesh/v1alpha1/tcp_route.proto diff --git a/internal/catalog/exports.go b/internal/catalog/exports.go index e0373bf7079b..06af51d37a4b 100644 --- a/internal/catalog/exports.go +++ b/internal/catalog/exports.go @@ -32,6 +32,7 @@ var ( HealthStatusKind = types.HealthStatusKind HealthChecksKind = types.HealthChecksKind DNSPolicyKind = types.DNSPolicyKind + FailoverPolicyKind = types.FailoverPolicyKind // Resource Types for the v1alpha1 version. @@ -43,6 +44,19 @@ var ( HealthStatusV1Alpha1Type = types.HealthStatusV1Alpha1Type HealthChecksV1Alpha1Type = types.HealthChecksV1Alpha1Type DNSPolicyV1Alpha1Type = types.DNSPolicyV1Alpha1Type + FailoverPolicyV1Alpha1Type = types.FailoverPolicyV1Alpha1Type + + // Resource Types for the latest version. + + WorkloadType = types.WorkloadType + ServiceType = types.ServiceType + ServiceEndpointsType = types.ServiceEndpointsType + VirtualIPsType = types.VirtualIPsType + NodeType = types.NodeType + HealthStatusType = types.HealthStatusType + HealthChecksType = types.HealthChecksType + DNSPolicyType = types.DNSPolicyType + FailoverPolicyType = types.FailoverPolicyType // Controller Statuses NodeHealthStatusKey = nodehealth.StatusKey diff --git a/internal/catalog/internal/types/failover_policy.go b/internal/catalog/internal/types/failover_policy.go new file mode 100644 index 000000000000..61930bc1c54d --- /dev/null +++ b/internal/catalog/internal/types/failover_policy.go @@ -0,0 +1,33 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package types + +import ( + "github.com/hashicorp/consul/internal/resource" + pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" + "github.com/hashicorp/consul/proto-public/pbresource" +) + +const ( + FailoverPolicyKind = "FailoverPolicy" +) + +var ( + FailoverPolicyV1Alpha1Type = &pbresource.Type{ + Group: GroupName, + GroupVersion: VersionV1Alpha1, + Kind: FailoverPolicyKind, + } + + FailoverPolicyType = FailoverPolicyV1Alpha1Type +) + +func RegisterFailoverPolicy(r resource.Registry) { + r.Register(resource.Registration{ + Type: FailoverPolicyV1Alpha1Type, + Proto: &pbcatalog.FailoverPolicy{}, + Validate: nil, + Mutate: nil, + }) +} diff --git a/internal/catalog/internal/types/types.go b/internal/catalog/internal/types/types.go index 6ab3730bb293..3eb76d296f5b 100644 --- a/internal/catalog/internal/types/types.go +++ b/internal/catalog/internal/types/types.go @@ -22,4 +22,5 @@ func Register(r resource.Registry) { RegisterHealthChecks(r) RegisterDNSPolicy(r) RegisterVirtualIPs(r) + RegisterFailoverPolicy(r) } diff --git a/internal/mesh/exports.go b/internal/mesh/exports.go index 78056db0d1d7..f0edd1ff45ec 100644 --- a/internal/mesh/exports.go +++ b/internal/mesh/exports.go @@ -17,9 +17,15 @@ var ( // Resource Kind Names. - ProxyConfigurationKind = types.ProxyConfigurationKind - UpstreamsKind = types.UpstreamsKind - ProxyStateKind = types.ProxyStateTemplateKind + ProxyConfigurationKind = types.ProxyConfigurationKind + UpstreamsKind = types.UpstreamsKind + UpstreamsConfigurationKind = types.UpstreamsConfigurationKind + ProxyStateKind = types.ProxyStateTemplateKind + HTTPRouteKind = types.HTTPRouteKind + GRPCRouteKind = types.GRPCRouteKind + TCPRouteKind = types.TCPRouteKind + DestinationPolicyKind = types.DestinationPolicyKind + ComputedRoutesKind = types.ComputedRoutesKind // Resource Types for the v1alpha1 version. @@ -27,6 +33,23 @@ var ( UpstreamsV1Alpha1Type = types.UpstreamsV1Alpha1Type UpstreamsConfigurationV1Alpha1Type = types.UpstreamsConfigurationV1Alpha1Type ProxyStateTemplateConfigurationV1Alpha1Type = types.ProxyStateTemplateV1Alpha1Type + HTTPRouteV1Alpha1Type = types.HTTPRouteV1Alpha1Type + GRPCRouteV1Alpha1Type = types.GRPCRouteV1Alpha1Type + TCPRouteV1Alpha1Type = types.TCPRouteV1Alpha1Type + DestinationPolicyV1Alpha1Type = types.DestinationPolicyV1Alpha1Type + ComputedRoutesV1Alpha1Type = types.ComputedRoutesV1Alpha1Type + + // Resource Types for the latest version. + + ProxyConfigurationType = types.ProxyConfigurationType + UpstreamsType = types.UpstreamsType + UpstreamsConfigurationType = types.UpstreamsConfigurationType + ProxyStateTemplateConfigurationType = types.ProxyStateTemplateType + HTTPRouteType = types.HTTPRouteType + GRPCRouteType = types.GRPCRouteType + TCPRouteType = types.TCPRouteType + DestinationPolicyType = types.DestinationPolicyType + ComputedRoutesType = types.ComputedRoutesType ) // RegisterTypes adds all resource types within the "catalog" API group diff --git a/internal/mesh/internal/types/computed_routes.go b/internal/mesh/internal/types/computed_routes.go new file mode 100644 index 000000000000..aca627d554fa --- /dev/null +++ b/internal/mesh/internal/types/computed_routes.go @@ -0,0 +1,32 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package types + +import ( + "github.com/hashicorp/consul/internal/resource" + pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" + "github.com/hashicorp/consul/proto-public/pbresource" +) + +const ( + ComputedRoutesKind = "ComputedRoutes" +) + +var ( + ComputedRoutesV1Alpha1Type = &pbresource.Type{ + Group: GroupName, + GroupVersion: VersionV1Alpha1, + Kind: ComputedRoutesKind, + } + + ComputedRoutesType = ComputedRoutesV1Alpha1Type +) + +func RegisterComputedRoutes(r resource.Registry) { + r.Register(resource.Registration{ + Type: ComputedRoutesV1Alpha1Type, + Proto: &pbmesh.ComputedRoutes{}, + Validate: nil, + }) +} diff --git a/internal/mesh/internal/types/destination_policy.go b/internal/mesh/internal/types/destination_policy.go new file mode 100644 index 000000000000..f92dbabdae03 --- /dev/null +++ b/internal/mesh/internal/types/destination_policy.go @@ -0,0 +1,32 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package types + +import ( + "github.com/hashicorp/consul/internal/resource" + pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" + "github.com/hashicorp/consul/proto-public/pbresource" +) + +const ( + DestinationPolicyKind = "DestinationPolicy" +) + +var ( + DestinationPolicyV1Alpha1Type = &pbresource.Type{ + Group: GroupName, + GroupVersion: VersionV1Alpha1, + Kind: DestinationPolicyKind, + } + + DestinationPolicyType = DestinationPolicyV1Alpha1Type +) + +func RegisterDestinationPolicy(r resource.Registry) { + r.Register(resource.Registration{ + Type: DestinationPolicyV1Alpha1Type, + Proto: &pbmesh.DestinationPolicy{}, + Validate: nil, + }) +} diff --git a/internal/mesh/internal/types/grpc_route.go b/internal/mesh/internal/types/grpc_route.go new file mode 100644 index 000000000000..eacf5a245b0f --- /dev/null +++ b/internal/mesh/internal/types/grpc_route.go @@ -0,0 +1,32 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package types + +import ( + "github.com/hashicorp/consul/internal/resource" + pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" + "github.com/hashicorp/consul/proto-public/pbresource" +) + +const ( + GRPCRouteKind = "GRPCRoute" +) + +var ( + GRPCRouteV1Alpha1Type = &pbresource.Type{ + Group: GroupName, + GroupVersion: VersionV1Alpha1, + Kind: GRPCRouteKind, + } + + GRPCRouteType = GRPCRouteV1Alpha1Type +) + +func RegisterGRPCRoute(r resource.Registry) { + r.Register(resource.Registration{ + Type: GRPCRouteV1Alpha1Type, + Proto: &pbmesh.GRPCRoute{}, + Validate: nil, + }) +} diff --git a/internal/mesh/internal/types/http_route.go b/internal/mesh/internal/types/http_route.go new file mode 100644 index 000000000000..bd2a4a43f846 --- /dev/null +++ b/internal/mesh/internal/types/http_route.go @@ -0,0 +1,32 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package types + +import ( + "github.com/hashicorp/consul/internal/resource" + pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" + "github.com/hashicorp/consul/proto-public/pbresource" +) + +const ( + HTTPRouteKind = "HTTPRoute" +) + +var ( + HTTPRouteV1Alpha1Type = &pbresource.Type{ + Group: GroupName, + GroupVersion: VersionV1Alpha1, + Kind: HTTPRouteKind, + } + + HTTPRouteType = HTTPRouteV1Alpha1Type +) + +func RegisterHTTPRoute(r resource.Registry) { + r.Register(resource.Registration{ + Type: HTTPRouteV1Alpha1Type, + Proto: &pbmesh.HTTPRoute{}, + Validate: nil, + }) +} diff --git a/internal/mesh/internal/types/tcp_route.go b/internal/mesh/internal/types/tcp_route.go new file mode 100644 index 000000000000..dcd1eca4a491 --- /dev/null +++ b/internal/mesh/internal/types/tcp_route.go @@ -0,0 +1,32 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +package types + +import ( + "github.com/hashicorp/consul/internal/resource" + pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" + "github.com/hashicorp/consul/proto-public/pbresource" +) + +const ( + TCPRouteKind = "TCPRoute" +) + +var ( + TCPRouteV1Alpha1Type = &pbresource.Type{ + Group: GroupName, + GroupVersion: VersionV1Alpha1, + Kind: TCPRouteKind, + } + + TCPRouteType = TCPRouteV1Alpha1Type +) + +func RegisterTCPRoute(r resource.Registry) { + r.Register(resource.Registration{ + Type: TCPRouteV1Alpha1Type, + Proto: &pbmesh.TCPRoute{}, + Validate: nil, + }) +} diff --git a/internal/mesh/internal/types/types.go b/internal/mesh/internal/types/types.go index d1ca23b09528..4fc36c11b243 100644 --- a/internal/mesh/internal/types/types.go +++ b/internal/mesh/internal/types/types.go @@ -18,4 +18,9 @@ func Register(r resource.Registry) { RegisterUpstreams(r) RegisterUpstreamsConfiguration(r) RegisterProxyStateTemplate(r) + RegisterHTTPRoute(r) + RegisterTCPRoute(r) + RegisterGRPCRoute(r) + RegisterDestinationPolicy(r) + RegisterComputedRoutes(r) } diff --git a/proto-public/pbcatalog/v1alpha1/failover_policy.pb.binary.go b/proto-public/pbcatalog/v1alpha1/failover_policy.pb.binary.go new file mode 100644 index 000000000000..85aa74cd41db --- /dev/null +++ b/proto-public/pbcatalog/v1alpha1/failover_policy.pb.binary.go @@ -0,0 +1,38 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbcatalog/v1alpha1/failover_policy.proto + +package catalogv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *FailoverPolicy) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *FailoverPolicy) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *FailoverConfig) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *FailoverConfig) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *FailoverDestination) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *FailoverDestination) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbcatalog/v1alpha1/failover_policy.pb.go b/proto-public/pbcatalog/v1alpha1/failover_policy.pb.go new file mode 100644 index 000000000000..568405a1cd53 --- /dev/null +++ b/proto-public/pbcatalog/v1alpha1/failover_policy.pb.go @@ -0,0 +1,457 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbcatalog/v1alpha1/failover_policy.proto + +package catalogv1alpha1 + +import ( + pbresource "github.com/hashicorp/consul/proto-public/pbresource" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FailoverMode int32 + +const ( + FailoverMode_FAILOVER_MODE_UNSPECIFIED FailoverMode = 0 + FailoverMode_FAILOVER_MODE_SEQUENTIAL FailoverMode = 1 + FailoverMode_FAILOVER_MODE_ORDER_BY_LOCALITY FailoverMode = 2 +) + +// Enum value maps for FailoverMode. +var ( + FailoverMode_name = map[int32]string{ + 0: "FAILOVER_MODE_UNSPECIFIED", + 1: "FAILOVER_MODE_SEQUENTIAL", + 2: "FAILOVER_MODE_ORDER_BY_LOCALITY", + } + FailoverMode_value = map[string]int32{ + "FAILOVER_MODE_UNSPECIFIED": 0, + "FAILOVER_MODE_SEQUENTIAL": 1, + "FAILOVER_MODE_ORDER_BY_LOCALITY": 2, + } +) + +func (x FailoverMode) Enum() *FailoverMode { + p := new(FailoverMode) + *p = x + return p +} + +func (x FailoverMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (FailoverMode) Descriptor() protoreflect.EnumDescriptor { + return file_pbcatalog_v1alpha1_failover_policy_proto_enumTypes[0].Descriptor() +} + +func (FailoverMode) Type() protoreflect.EnumType { + return &file_pbcatalog_v1alpha1_failover_policy_proto_enumTypes[0] +} + +func (x FailoverMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use FailoverMode.Descriptor instead. +func (FailoverMode) EnumDescriptor() ([]byte, []int) { + return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP(), []int{0} +} + +// This is a Resource type. +type FailoverPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Config defines failover for any named port not present in PortConfigs. + Config *FailoverConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + // PortConfigs defines failover for a specific port on this service and takes + // precedence over Config. + PortConfigs map[string]*FailoverConfig `protobuf:"bytes,2,rep,name=port_configs,json=portConfigs,proto3" json:"port_configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *FailoverPolicy) Reset() { + *x = FailoverPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FailoverPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailoverPolicy) ProtoMessage() {} + +func (x *FailoverPolicy) ProtoReflect() protoreflect.Message { + mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailoverPolicy.ProtoReflect.Descriptor instead. +func (*FailoverPolicy) Descriptor() ([]byte, []int) { + return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP(), []int{0} +} + +func (x *FailoverPolicy) GetConfig() *FailoverConfig { + if x != nil { + return x.Config + } + return nil +} + +func (x *FailoverPolicy) GetPortConfigs() map[string]*FailoverConfig { + if x != nil { + return x.PortConfigs + } + return nil +} + +type FailoverConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Destinations specifies a fixed list of failover destinations to try. We + // never try a destination multiple times, so those are subtracted from this + // list before proceeding. + Destinations []*FailoverDestination `protobuf:"bytes,1,rep,name=destinations,proto3" json:"destinations,omitempty"` + // Mode specifies the type of failover that will be performed. Valid values are + // "sequential", "" (equivalent to "sequential") and "order-by-locality". + Mode FailoverMode `protobuf:"varint,2,opt,name=mode,proto3,enum=hashicorp.consul.catalog.v1alpha1.FailoverMode" json:"mode,omitempty"` + Regions []string `protobuf:"bytes,3,rep,name=regions,proto3" json:"regions,omitempty"` + // SamenessGroup specifies the sameness group to failover to. + SamenessGroup string `protobuf:"bytes,4,opt,name=sameness_group,json=samenessGroup,proto3" json:"sameness_group,omitempty"` +} + +func (x *FailoverConfig) Reset() { + *x = FailoverConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FailoverConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailoverConfig) ProtoMessage() {} + +func (x *FailoverConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailoverConfig.ProtoReflect.Descriptor instead. +func (*FailoverConfig) Descriptor() ([]byte, []int) { + return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP(), []int{1} +} + +func (x *FailoverConfig) GetDestinations() []*FailoverDestination { + if x != nil { + return x.Destinations + } + return nil +} + +func (x *FailoverConfig) GetMode() FailoverMode { + if x != nil { + return x.Mode + } + return FailoverMode_FAILOVER_MODE_UNSPECIFIED +} + +func (x *FailoverConfig) GetRegions() []string { + if x != nil { + return x.Regions + } + return nil +} + +func (x *FailoverConfig) GetSamenessGroup() string { + if x != nil { + return x.SamenessGroup + } + return "" +} + +type FailoverDestination struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // This must be a Service. + Ref *pbresource.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` + // TODO: what should an empty port mean? + Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` + Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` +} + +func (x *FailoverDestination) Reset() { + *x = FailoverDestination{} + if protoimpl.UnsafeEnabled { + mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FailoverDestination) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FailoverDestination) ProtoMessage() {} + +func (x *FailoverDestination) ProtoReflect() protoreflect.Message { + mi := &file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FailoverDestination.ProtoReflect.Descriptor instead. +func (*FailoverDestination) Descriptor() ([]byte, []int) { + return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP(), []int{2} +} + +func (x *FailoverDestination) GetRef() *pbresource.Reference { + if x != nil { + return x.Ref + } + return nil +} + +func (x *FailoverDestination) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + +func (x *FailoverDestination) GetDatacenter() string { + if x != nil { + return x.Datacenter + } + return "" +} + +var File_pbcatalog_v1alpha1_failover_policy_proto protoreflect.FileDescriptor + +var file_pbcatalog_v1alpha1_failover_policy_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x19, 0x70, + 0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb5, 0x02, 0x0a, 0x0e, 0x46, 0x61, 0x69, + 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x49, 0x0a, 0x06, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x65, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0b, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x71, 0x0a, + 0x10, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xf2, 0x01, 0x0a, 0x0e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x5a, 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, + 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x43, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, + 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x73, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x61, 0x6d, 0x65, 0x6e, 0x65, 0x73, 0x73, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x81, 0x01, 0x0a, 0x13, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, + 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, + 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, + 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, + 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2a, 0x70, 0x0a, 0x0c, 0x46, 0x61, 0x69, + 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x46, 0x41, 0x49, + 0x4c, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, + 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, + 0x54, 0x49, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x4f, 0x56, + 0x45, 0x52, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, + 0x5f, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x10, 0x02, 0x42, 0xb0, 0x02, 0x0a, 0x25, + 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x43, 0xaa, + 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xca, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, + 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbcatalog_v1alpha1_failover_policy_proto_rawDescOnce sync.Once + file_pbcatalog_v1alpha1_failover_policy_proto_rawDescData = file_pbcatalog_v1alpha1_failover_policy_proto_rawDesc +) + +func file_pbcatalog_v1alpha1_failover_policy_proto_rawDescGZIP() []byte { + file_pbcatalog_v1alpha1_failover_policy_proto_rawDescOnce.Do(func() { + file_pbcatalog_v1alpha1_failover_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbcatalog_v1alpha1_failover_policy_proto_rawDescData) + }) + return file_pbcatalog_v1alpha1_failover_policy_proto_rawDescData +} + +var file_pbcatalog_v1alpha1_failover_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_pbcatalog_v1alpha1_failover_policy_proto_goTypes = []interface{}{ + (FailoverMode)(0), // 0: hashicorp.consul.catalog.v1alpha1.FailoverMode + (*FailoverPolicy)(nil), // 1: hashicorp.consul.catalog.v1alpha1.FailoverPolicy + (*FailoverConfig)(nil), // 2: hashicorp.consul.catalog.v1alpha1.FailoverConfig + (*FailoverDestination)(nil), // 3: hashicorp.consul.catalog.v1alpha1.FailoverDestination + nil, // 4: hashicorp.consul.catalog.v1alpha1.FailoverPolicy.PortConfigsEntry + (*pbresource.Reference)(nil), // 5: hashicorp.consul.resource.Reference +} +var file_pbcatalog_v1alpha1_failover_policy_proto_depIdxs = []int32{ + 2, // 0: hashicorp.consul.catalog.v1alpha1.FailoverPolicy.config:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverConfig + 4, // 1: hashicorp.consul.catalog.v1alpha1.FailoverPolicy.port_configs:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverPolicy.PortConfigsEntry + 3, // 2: hashicorp.consul.catalog.v1alpha1.FailoverConfig.destinations:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverDestination + 0, // 3: hashicorp.consul.catalog.v1alpha1.FailoverConfig.mode:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverMode + 5, // 4: hashicorp.consul.catalog.v1alpha1.FailoverDestination.ref:type_name -> hashicorp.consul.resource.Reference + 2, // 5: hashicorp.consul.catalog.v1alpha1.FailoverPolicy.PortConfigsEntry.value:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverConfig + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name +} + +func init() { file_pbcatalog_v1alpha1_failover_policy_proto_init() } +func file_pbcatalog_v1alpha1_failover_policy_proto_init() { + if File_pbcatalog_v1alpha1_failover_policy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailoverPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailoverConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FailoverDestination); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbcatalog_v1alpha1_failover_policy_proto_rawDesc, + NumEnums: 1, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbcatalog_v1alpha1_failover_policy_proto_goTypes, + DependencyIndexes: file_pbcatalog_v1alpha1_failover_policy_proto_depIdxs, + EnumInfos: file_pbcatalog_v1alpha1_failover_policy_proto_enumTypes, + MessageInfos: file_pbcatalog_v1alpha1_failover_policy_proto_msgTypes, + }.Build() + File_pbcatalog_v1alpha1_failover_policy_proto = out.File + file_pbcatalog_v1alpha1_failover_policy_proto_rawDesc = nil + file_pbcatalog_v1alpha1_failover_policy_proto_goTypes = nil + file_pbcatalog_v1alpha1_failover_policy_proto_depIdxs = nil +} diff --git a/proto-public/pbcatalog/v1alpha1/failover_policy.proto b/proto-public/pbcatalog/v1alpha1/failover_policy.proto new file mode 100644 index 000000000000..69dcec0d973d --- /dev/null +++ b/proto-public/pbcatalog/v1alpha1/failover_policy.proto @@ -0,0 +1,47 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.catalog.v1alpha1; + +import "pbresource/resource.proto"; + +// This is a Resource type. +message FailoverPolicy { + // Config defines failover for any named port not present in PortConfigs. + FailoverConfig config = 1; + + // PortConfigs defines failover for a specific port on this service and takes + // precedence over Config. + map port_configs = 2; +} + +message FailoverConfig { + // Destinations specifies a fixed list of failover destinations to try. We + // never try a destination multiple times, so those are subtracted from this + // list before proceeding. + repeated FailoverDestination destinations = 1; + + // Mode specifies the type of failover that will be performed. Valid values are + // "sequential", "" (equivalent to "sequential") and "order-by-locality". + FailoverMode mode = 2; + repeated string regions = 3; + + // SamenessGroup specifies the sameness group to failover to. + string sameness_group = 4; +} + +message FailoverDestination { + // This must be a Service. + hashicorp.consul.resource.Reference ref = 1; + // TODO: what should an empty port mean? + string port = 2; + string datacenter = 3; +} + +enum FailoverMode { + FAILOVER_MODE_UNSPECIFIED = 0; + FAILOVER_MODE_SEQUENTIAL = 1; + FAILOVER_MODE_ORDER_BY_LOCALITY = 2; +} diff --git a/proto-public/pbcatalog/v1alpha1/selector.pb.go b/proto-public/pbcatalog/v1alpha1/selector.pb.go index a6f5a3ef880d..8caf0f51d6c8 100644 --- a/proto-public/pbcatalog/v1alpha1/selector.pb.go +++ b/proto-public/pbcatalog/v1alpha1/selector.pb.go @@ -31,6 +31,7 @@ type WorkloadSelector struct { Prefixes []string `protobuf:"bytes,1,rep,name=prefixes,proto3" json:"prefixes,omitempty"` Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"` + Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` } func (x *WorkloadSelector) Reset() { @@ -79,6 +80,13 @@ func (x *WorkloadSelector) GetNames() []string { return nil } +func (x *WorkloadSelector) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + var File_pbcatalog_v1alpha1_selector_proto protoreflect.FileDescriptor var file_pbcatalog_v1alpha1_selector_proto_rawDesc = []byte{ @@ -86,31 +94,32 @@ var file_pbcatalog_v1alpha1_selector_proto_rawDesc = []byte{ 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x44, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x5c, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x42, 0xaa, 0x02, 0x0a, - 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, - 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x2f, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x43, 0xaa, 0x02, 0x21, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x43, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, - 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, - 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, - 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x24, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, - 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x42, 0xaa, 0x02, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, + 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, + 0x43, 0x43, 0xaa, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2d, 0x48, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x48, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto-public/pbcatalog/v1alpha1/selector.proto b/proto-public/pbcatalog/v1alpha1/selector.proto index b1b39409ba3a..1b5aa366e07f 100644 --- a/proto-public/pbcatalog/v1alpha1/selector.proto +++ b/proto-public/pbcatalog/v1alpha1/selector.proto @@ -9,4 +9,5 @@ package hashicorp.consul.catalog.v1alpha1; message WorkloadSelector { repeated string prefixes = 1; repeated string names = 2; + string filter = 3; } diff --git a/proto-public/pbmesh/v1alpha1/common.pb.binary.go b/proto-public/pbmesh/v1alpha1/common.pb.binary.go new file mode 100644 index 000000000000..a02a97e494a1 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/common.pb.binary.go @@ -0,0 +1,28 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbmesh/v1alpha1/common.proto + +package meshv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *ParentReference) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *ParentReference) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *BackendReference) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *BackendReference) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/common.pb.go b/proto-public/pbmesh/v1alpha1/common.pb.go new file mode 100644 index 000000000000..4262d3872c3d --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/common.pb.go @@ -0,0 +1,307 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/common.proto + +package meshv1alpha1 + +import ( + pbresource "github.com/hashicorp/consul/proto-public/pbresource" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// NOTE: roughly equivalent to structs.ResourceReference +type ParentReference struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // For east/west configuration, this should point to a pbcatalog.Service. + // For north/south it should point to a gateway (TBD) + Ref *pbresource.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` + // Port is the network port this Route targets. It can be interpreted + // differently based on the type of parent resource. + // + // When the parent resource is a Gateway, this targets all listeners + // listening on the specified port that also support this kind of Route(and + // select this Route). It’s not recommended to set Port unless the networking + // behaviors specified in a Route must apply to a specific port as opposed to + // a listener(s) whose port(s) may be changed. When both Port and SectionName + // are specified, the name and port of the selected listener must match both + // specified values. + // + // Implementations MAY choose to support other parent resources. + // Implementations supporting other types of parent resources MUST clearly + // document how/if Port is interpreted. + // + // For the purpose of status, an attachment is considered successful as long + // as the parent resource accepts it partially. For example, Gateway + // listeners can restrict which Routes can attach to them by Route kind, + // namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from + // the referencing Route, the Route MUST be considered successfully attached. + // If no Gateway listeners accept attachment from this Route, the Route MUST + // be considered detached from the Gateway. + // + // For east/west this is the name of the consul port. + // For north/south this is the stringified integer port expected by GAMMA. + // + // https://gateway-api.sigs.k8s.io/geps/gep-957/ + Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` +} + +func (x *ParentReference) Reset() { + *x = ParentReference{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_common_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ParentReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ParentReference) ProtoMessage() {} + +func (x *ParentReference) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_common_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ParentReference.ProtoReflect.Descriptor instead. +func (*ParentReference) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_common_proto_rawDescGZIP(), []int{0} +} + +func (x *ParentReference) GetRef() *pbresource.Reference { + if x != nil { + return x.Ref + } + return nil +} + +func (x *ParentReference) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + +type BackendReference struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // For east/west configuration, this should point to either a + // pbcatalog.Service or ServiceSubset. + // + // For Partition/PeerName fields likely we could map them to ServiceImports + // (MCS+GAMMA) when translating + Ref *pbresource.Reference `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"` + // For east/west this is the name of the consul port. + Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` + // NOT IN GAMMA; multi-cluster + GWapi is still unknown + // + // Likely we could map this to ServiceImports (MCS+GAMMA) when translating + // to/from k8s. + // + // https://gateway-api.sigs.k8s.io/geps/gep-1748/ + Datacenter string `protobuf:"bytes,3,opt,name=datacenter,proto3" json:"datacenter,omitempty"` +} + +func (x *BackendReference) Reset() { + *x = BackendReference{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_common_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BackendReference) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackendReference) ProtoMessage() {} + +func (x *BackendReference) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_common_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackendReference.ProtoReflect.Descriptor instead. +func (*BackendReference) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_common_proto_rawDescGZIP(), []int{1} +} + +func (x *BackendReference) GetRef() *pbresource.Reference { + if x != nil { + return x.Ref + } + return nil +} + +func (x *BackendReference) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + +func (x *BackendReference) GetDatacenter() string { + if x != nil { + return x.Datacenter + } + return "" +} + +var File_pbmesh_v1alpha1_common_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_common_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x19, + 0x70, 0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x0f, 0x50, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x03, + 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, + 0x03, 0x72, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x7e, 0x0a, 0x10, 0x42, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x03, + 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, + 0x03, 0x72, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, + 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x61, + 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x42, 0x93, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, + 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, + 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, + 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, + 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, + 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_common_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_common_proto_rawDescData = file_pbmesh_v1alpha1_common_proto_rawDesc +) + +func file_pbmesh_v1alpha1_common_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_common_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_common_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_common_proto_rawDescData +} + +var file_pbmesh_v1alpha1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pbmesh_v1alpha1_common_proto_goTypes = []interface{}{ + (*ParentReference)(nil), // 0: hashicorp.consul.mesh.v1alpha1.ParentReference + (*BackendReference)(nil), // 1: hashicorp.consul.mesh.v1alpha1.BackendReference + (*pbresource.Reference)(nil), // 2: hashicorp.consul.resource.Reference +} +var file_pbmesh_v1alpha1_common_proto_depIdxs = []int32{ + 2, // 0: hashicorp.consul.mesh.v1alpha1.ParentReference.ref:type_name -> hashicorp.consul.resource.Reference + 2, // 1: hashicorp.consul.mesh.v1alpha1.BackendReference.ref:type_name -> hashicorp.consul.resource.Reference + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_common_proto_init() } +func file_pbmesh_v1alpha1_common_proto_init() { + if File_pbmesh_v1alpha1_common_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ParentReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackendReference); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_common_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_common_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_common_proto_depIdxs, + MessageInfos: file_pbmesh_v1alpha1_common_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_common_proto = out.File + file_pbmesh_v1alpha1_common_proto_rawDesc = nil + file_pbmesh_v1alpha1_common_proto_goTypes = nil + file_pbmesh_v1alpha1_common_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/common.proto b/proto-public/pbmesh/v1alpha1/common.proto new file mode 100644 index 000000000000..48668e59dd5a --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/common.proto @@ -0,0 +1,64 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.mesh.v1alpha1; + +import "pbresource/resource.proto"; + +// NOTE: roughly equivalent to structs.ResourceReference +message ParentReference { + // For east/west configuration, this should point to a pbcatalog.Service. + // For north/south it should point to a gateway (TBD) + hashicorp.consul.resource.Reference ref = 1; + + // Port is the network port this Route targets. It can be interpreted + // differently based on the type of parent resource. + // + // When the parent resource is a Gateway, this targets all listeners + // listening on the specified port that also support this kind of Route(and + // select this Route). It’s not recommended to set Port unless the networking + // behaviors specified in a Route must apply to a specific port as opposed to + // a listener(s) whose port(s) may be changed. When both Port and SectionName + // are specified, the name and port of the selected listener must match both + // specified values. + // + // Implementations MAY choose to support other parent resources. + // Implementations supporting other types of parent resources MUST clearly + // document how/if Port is interpreted. + // + // For the purpose of status, an attachment is considered successful as long + // as the parent resource accepts it partially. For example, Gateway + // listeners can restrict which Routes can attach to them by Route kind, + // namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from + // the referencing Route, the Route MUST be considered successfully attached. + // If no Gateway listeners accept attachment from this Route, the Route MUST + // be considered detached from the Gateway. + // + // For east/west this is the name of the consul port. + // For north/south this is the stringified integer port expected by GAMMA. + // + // https://gateway-api.sigs.k8s.io/geps/gep-957/ + string port = 2; +} + +message BackendReference { + // For east/west configuration, this should point to either a + // pbcatalog.Service or ServiceSubset. + // + // For Partition/PeerName fields likely we could map them to ServiceImports + // (MCS+GAMMA) when translating + hashicorp.consul.resource.Reference ref = 1; + + // For east/west this is the name of the consul port. + string port = 2; + + // NOT IN GAMMA; multi-cluster + GWapi is still unknown + // + // Likely we could map this to ServiceImports (MCS+GAMMA) when translating + // to/from k8s. + // + // https://gateway-api.sigs.k8s.io/geps/gep-1748/ + string datacenter = 3; +} diff --git a/proto-public/pbmesh/v1alpha1/computed_routes.pb.binary.go b/proto-public/pbmesh/v1alpha1/computed_routes.pb.binary.go new file mode 100644 index 000000000000..cd30ceac2707 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/computed_routes.pb.binary.go @@ -0,0 +1,128 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbmesh/v1alpha1/computed_routes.proto + +package meshv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *ComputedRoutes) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *ComputedRoutes) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *ComputedPortRoutes) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *ComputedPortRoutes) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedHTTPRoute) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedHTTPRoute) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedHTTPRouteRule) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedHTTPRouteRule) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedHTTPBackendRef) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedHTTPBackendRef) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedGRPCRoute) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedGRPCRoute) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedGRPCRouteRule) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedGRPCRouteRule) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedGRPCBackendRef) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedGRPCBackendRef) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedTCPRoute) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedTCPRoute) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedTCPRouteRule) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedTCPRouteRule) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *InterpretedTCPBackendRef) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *InterpretedTCPBackendRef) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *BackendTargetDetails) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *BackendTargetDetails) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/computed_routes.pb.go b/proto-public/pbmesh/v1alpha1/computed_routes.pb.go new file mode 100644 index 000000000000..605e4fbd679e --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/computed_routes.pb.go @@ -0,0 +1,1321 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/computed_routes.proto + +package meshv1alpha1 + +import ( + v1alpha1 "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a Resource type. +type ComputedRoutes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PortedConfigs map[string]*ComputedPortRoutes `protobuf:"bytes,1,rep,name=ported_configs,json=portedConfigs,proto3" json:"ported_configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ComputedRoutes) Reset() { + *x = ComputedRoutes{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComputedRoutes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComputedRoutes) ProtoMessage() {} + +func (x *ComputedRoutes) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComputedRoutes.ProtoReflect.Descriptor instead. +func (*ComputedRoutes) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{0} +} + +func (x *ComputedRoutes) GetPortedConfigs() map[string]*ComputedPortRoutes { + if x != nil { + return x.PortedConfigs + } + return nil +} + +type ComputedPortRoutes struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Config: + // + // *ComputedPortRoutes_Http + // *ComputedPortRoutes_Grpc + // *ComputedPortRoutes_Tcp + Config isComputedPortRoutes_Config `protobuf_oneof:"config"` + UsingDefaultConfig bool `protobuf:"varint,4,opt,name=using_default_config,json=usingDefaultConfig,proto3" json:"using_default_config,omitempty"` // TODO + // map key is an opaque string; like disco chain target name + Targets map[string]*BackendTargetDetails `protobuf:"bytes,5,rep,name=targets,proto3" json:"targets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ComputedPortRoutes) Reset() { + *x = ComputedPortRoutes{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComputedPortRoutes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComputedPortRoutes) ProtoMessage() {} + +func (x *ComputedPortRoutes) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComputedPortRoutes.ProtoReflect.Descriptor instead. +func (*ComputedPortRoutes) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{1} +} + +func (m *ComputedPortRoutes) GetConfig() isComputedPortRoutes_Config { + if m != nil { + return m.Config + } + return nil +} + +func (x *ComputedPortRoutes) GetHttp() *InterpretedHTTPRoute { + if x, ok := x.GetConfig().(*ComputedPortRoutes_Http); ok { + return x.Http + } + return nil +} + +func (x *ComputedPortRoutes) GetGrpc() *InterpretedGRPCRoute { + if x, ok := x.GetConfig().(*ComputedPortRoutes_Grpc); ok { + return x.Grpc + } + return nil +} + +func (x *ComputedPortRoutes) GetTcp() *InterpretedTCPRoute { + if x, ok := x.GetConfig().(*ComputedPortRoutes_Tcp); ok { + return x.Tcp + } + return nil +} + +func (x *ComputedPortRoutes) GetUsingDefaultConfig() bool { + if x != nil { + return x.UsingDefaultConfig + } + return false +} + +func (x *ComputedPortRoutes) GetTargets() map[string]*BackendTargetDetails { + if x != nil { + return x.Targets + } + return nil +} + +type isComputedPortRoutes_Config interface { + isComputedPortRoutes_Config() +} + +type ComputedPortRoutes_Http struct { + Http *InterpretedHTTPRoute `protobuf:"bytes,1,opt,name=http,proto3,oneof"` +} + +type ComputedPortRoutes_Grpc struct { + Grpc *InterpretedGRPCRoute `protobuf:"bytes,2,opt,name=grpc,proto3,oneof"` +} + +type ComputedPortRoutes_Tcp struct { + Tcp *InterpretedTCPRoute `protobuf:"bytes,3,opt,name=tcp,proto3,oneof"` +} + +func (*ComputedPortRoutes_Http) isComputedPortRoutes_Config() {} + +func (*ComputedPortRoutes_Grpc) isComputedPortRoutes_Config() {} + +func (*ComputedPortRoutes_Tcp) isComputedPortRoutes_Config() {} + +type InterpretedHTTPRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentRef *ParentReference `protobuf:"bytes,1,opt,name=parent_ref,json=parentRef,proto3" json:"parent_ref,omitempty"` + Rules []*InterpretedHTTPRouteRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *InterpretedHTTPRoute) Reset() { + *x = InterpretedHTTPRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedHTTPRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedHTTPRoute) ProtoMessage() {} + +func (x *InterpretedHTTPRoute) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedHTTPRoute.ProtoReflect.Descriptor instead. +func (*InterpretedHTTPRoute) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{2} +} + +func (x *InterpretedHTTPRoute) GetParentRef() *ParentReference { + if x != nil { + return x.ParentRef + } + return nil +} + +func (x *InterpretedHTTPRoute) GetRules() []*InterpretedHTTPRouteRule { + if x != nil { + return x.Rules + } + return nil +} + +type InterpretedHTTPRouteRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Matches []*HTTPRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` + Filters []*HTTPRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + BackendRefs []*InterpretedHTTPBackendRef `protobuf:"bytes,3,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` + Timeouts *HTTPRouteTimeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"` + Retries *HTTPRouteRetries `protobuf:"bytes,5,opt,name=retries,proto3" json:"retries,omitempty"` +} + +func (x *InterpretedHTTPRouteRule) Reset() { + *x = InterpretedHTTPRouteRule{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedHTTPRouteRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedHTTPRouteRule) ProtoMessage() {} + +func (x *InterpretedHTTPRouteRule) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedHTTPRouteRule.ProtoReflect.Descriptor instead. +func (*InterpretedHTTPRouteRule) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{3} +} + +func (x *InterpretedHTTPRouteRule) GetMatches() []*HTTPRouteMatch { + if x != nil { + return x.Matches + } + return nil +} + +func (x *InterpretedHTTPRouteRule) GetFilters() []*HTTPRouteFilter { + if x != nil { + return x.Filters + } + return nil +} + +func (x *InterpretedHTTPRouteRule) GetBackendRefs() []*InterpretedHTTPBackendRef { + if x != nil { + return x.BackendRefs + } + return nil +} + +func (x *InterpretedHTTPRouteRule) GetTimeouts() *HTTPRouteTimeouts { + if x != nil { + return x.Timeouts + } + return nil +} + +func (x *InterpretedHTTPRouteRule) GetRetries() *HTTPRouteRetries { + if x != nil { + return x.Retries + } + return nil +} + +type InterpretedHTTPBackendRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BackendTarget string `protobuf:"bytes,1,opt,name=backend_target,json=backendTarget,proto3" json:"backend_target,omitempty"` + Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` + Filters []*HTTPRouteFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` +} + +func (x *InterpretedHTTPBackendRef) Reset() { + *x = InterpretedHTTPBackendRef{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedHTTPBackendRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedHTTPBackendRef) ProtoMessage() {} + +func (x *InterpretedHTTPBackendRef) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedHTTPBackendRef.ProtoReflect.Descriptor instead. +func (*InterpretedHTTPBackendRef) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{4} +} + +func (x *InterpretedHTTPBackendRef) GetBackendTarget() string { + if x != nil { + return x.BackendTarget + } + return "" +} + +func (x *InterpretedHTTPBackendRef) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *InterpretedHTTPBackendRef) GetFilters() []*HTTPRouteFilter { + if x != nil { + return x.Filters + } + return nil +} + +type InterpretedGRPCRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentRef *ParentReference `protobuf:"bytes,1,opt,name=parent_ref,json=parentRef,proto3" json:"parent_ref,omitempty"` + Rules []*InterpretedGRPCRouteRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *InterpretedGRPCRoute) Reset() { + *x = InterpretedGRPCRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedGRPCRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedGRPCRoute) ProtoMessage() {} + +func (x *InterpretedGRPCRoute) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedGRPCRoute.ProtoReflect.Descriptor instead. +func (*InterpretedGRPCRoute) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{5} +} + +func (x *InterpretedGRPCRoute) GetParentRef() *ParentReference { + if x != nil { + return x.ParentRef + } + return nil +} + +func (x *InterpretedGRPCRoute) GetRules() []*InterpretedGRPCRouteRule { + if x != nil { + return x.Rules + } + return nil +} + +type InterpretedGRPCRouteRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Matches []*GRPCRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` + Filters []*GRPCRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + BackendRefs []*InterpretedGRPCBackendRef `protobuf:"bytes,3,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` + Timeouts *HTTPRouteTimeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"` + Retries *HTTPRouteRetries `protobuf:"bytes,5,opt,name=retries,proto3" json:"retries,omitempty"` +} + +func (x *InterpretedGRPCRouteRule) Reset() { + *x = InterpretedGRPCRouteRule{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedGRPCRouteRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedGRPCRouteRule) ProtoMessage() {} + +func (x *InterpretedGRPCRouteRule) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedGRPCRouteRule.ProtoReflect.Descriptor instead. +func (*InterpretedGRPCRouteRule) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{6} +} + +func (x *InterpretedGRPCRouteRule) GetMatches() []*GRPCRouteMatch { + if x != nil { + return x.Matches + } + return nil +} + +func (x *InterpretedGRPCRouteRule) GetFilters() []*GRPCRouteFilter { + if x != nil { + return x.Filters + } + return nil +} + +func (x *InterpretedGRPCRouteRule) GetBackendRefs() []*InterpretedGRPCBackendRef { + if x != nil { + return x.BackendRefs + } + return nil +} + +func (x *InterpretedGRPCRouteRule) GetTimeouts() *HTTPRouteTimeouts { + if x != nil { + return x.Timeouts + } + return nil +} + +func (x *InterpretedGRPCRouteRule) GetRetries() *HTTPRouteRetries { + if x != nil { + return x.Retries + } + return nil +} + +type InterpretedGRPCBackendRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BackendTarget string `protobuf:"bytes,1,opt,name=backend_target,json=backendTarget,proto3" json:"backend_target,omitempty"` + Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` + Filters []*GRPCRouteFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` +} + +func (x *InterpretedGRPCBackendRef) Reset() { + *x = InterpretedGRPCBackendRef{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedGRPCBackendRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedGRPCBackendRef) ProtoMessage() {} + +func (x *InterpretedGRPCBackendRef) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedGRPCBackendRef.ProtoReflect.Descriptor instead. +func (*InterpretedGRPCBackendRef) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{7} +} + +func (x *InterpretedGRPCBackendRef) GetBackendTarget() string { + if x != nil { + return x.BackendTarget + } + return "" +} + +func (x *InterpretedGRPCBackendRef) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *InterpretedGRPCBackendRef) GetFilters() []*GRPCRouteFilter { + if x != nil { + return x.Filters + } + return nil +} + +type InterpretedTCPRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ParentRef *ParentReference `protobuf:"bytes,1,opt,name=parent_ref,json=parentRef,proto3" json:"parent_ref,omitempty"` + Rules []*InterpretedTCPRouteRule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *InterpretedTCPRoute) Reset() { + *x = InterpretedTCPRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedTCPRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedTCPRoute) ProtoMessage() {} + +func (x *InterpretedTCPRoute) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedTCPRoute.ProtoReflect.Descriptor instead. +func (*InterpretedTCPRoute) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{8} +} + +func (x *InterpretedTCPRoute) GetParentRef() *ParentReference { + if x != nil { + return x.ParentRef + } + return nil +} + +func (x *InterpretedTCPRoute) GetRules() []*InterpretedTCPRouteRule { + if x != nil { + return x.Rules + } + return nil +} + +type InterpretedTCPRouteRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BackendRefs []*InterpretedTCPBackendRef `protobuf:"bytes,1,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` +} + +func (x *InterpretedTCPRouteRule) Reset() { + *x = InterpretedTCPRouteRule{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedTCPRouteRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedTCPRouteRule) ProtoMessage() {} + +func (x *InterpretedTCPRouteRule) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedTCPRouteRule.ProtoReflect.Descriptor instead. +func (*InterpretedTCPRouteRule) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{9} +} + +func (x *InterpretedTCPRouteRule) GetBackendRefs() []*InterpretedTCPBackendRef { + if x != nil { + return x.BackendRefs + } + return nil +} + +// TODO: look into smuggling the target through a different typeURL, or just +// skip in favor of letting the caller do their own lookups? +type InterpretedTCPBackendRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BackendTarget string `protobuf:"bytes,1,opt,name=backend_target,json=backendTarget,proto3" json:"backend_target,omitempty"` + Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` +} + +func (x *InterpretedTCPBackendRef) Reset() { + *x = InterpretedTCPBackendRef{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InterpretedTCPBackendRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InterpretedTCPBackendRef) ProtoMessage() {} + +func (x *InterpretedTCPBackendRef) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InterpretedTCPBackendRef.ProtoReflect.Descriptor instead. +func (*InterpretedTCPBackendRef) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{10} +} + +func (x *InterpretedTCPBackendRef) GetBackendTarget() string { + if x != nil { + return x.BackendTarget + } + return "" +} + +func (x *InterpretedTCPBackendRef) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +type BackendTargetDetails struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // identity info + BackendRef *BackendReference `protobuf:"bytes,1,opt,name=backend_ref,json=backendRef,proto3" json:"backend_ref,omitempty"` + NullRouteTraffic bool `protobuf:"varint,2,opt,name=null_route_traffic,json=nullRouteTraffic,proto3" json:"null_route_traffic,omitempty"` + Service *v1alpha1.Service `protobuf:"bytes,3,opt,name=service,proto3" json:"service,omitempty"` + FailoverPolicy *v1alpha1.FailoverPolicy `protobuf:"bytes,4,opt,name=failover_policy,json=failoverPolicy,proto3" json:"failover_policy,omitempty"` + DestinationPolicy *DestinationPolicy `protobuf:"bytes,5,opt,name=destination_policy,json=destinationPolicy,proto3" json:"destination_policy,omitempty"` +} + +func (x *BackendTargetDetails) Reset() { + *x = BackendTargetDetails{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BackendTargetDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackendTargetDetails) ProtoMessage() {} + +func (x *BackendTargetDetails) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackendTargetDetails.ProtoReflect.Descriptor instead. +func (*BackendTargetDetails) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP(), []int{11} +} + +func (x *BackendTargetDetails) GetBackendRef() *BackendReference { + if x != nil { + return x.BackendRef + } + return nil +} + +func (x *BackendTargetDetails) GetNullRouteTraffic() bool { + if x != nil { + return x.NullRouteTraffic + } + return false +} + +func (x *BackendTargetDetails) GetService() *v1alpha1.Service { + if x != nil { + return x.Service + } + return nil +} + +func (x *BackendTargetDetails) GetFailoverPolicy() *v1alpha1.FailoverPolicy { + if x != nil { + return x.FailoverPolicy + } + return nil +} + +func (x *BackendTargetDetails) GetDestinationPolicy() *DestinationPolicy { + if x != nil { + return x.DestinationPolicy + } + return nil +} + +var File_pbmesh_v1alpha1_computed_routes_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_computed_routes_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x28, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x66, 0x61, 0x69, 0x6c, + 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x70, 0x62, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x62, 0x6d, + 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, + 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, + 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70, 0x62, 0x6d, 0x65, 0x73, + 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, + 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x68, 0x0a, 0x0e, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x41, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, + 0x50, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x73, 0x1a, 0x74, 0x0a, 0x12, 0x50, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xfe, 0x03, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, + 0x75, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x4a, + 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x4a, 0x0a, 0x04, 0x67, 0x72, + 0x70, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, + 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x47, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x03, 0x74, 0x63, 0x70, 0x12, + 0x30, 0x0a, 0x14, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x75, + 0x73, 0x69, 0x6e, 0x67, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x12, 0x59, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x70, 0x0a, 0x0c, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4a, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x08, + 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xbc, 0x01, 0x0a, 0x14, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x66, 0x12, 0x4e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, + 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, + 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xa8, 0x03, 0x0a, 0x18, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x52, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x49, + 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5c, 0x0a, 0x0c, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, + 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x52, 0x08, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, + 0x65, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x19, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, + 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x14, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, + 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x66, 0x12, 0x4e, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, + 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xa8, 0x03, 0x0a, 0x18, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, + 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5c, 0x0a, 0x0c, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x39, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, + 0x50, 0x43, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, + 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x52, 0x08, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, + 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x19, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x66, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x22, 0xb4, 0x01, 0x0a, + 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x66, 0x12, 0x4d, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, + 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, + 0x6c, 0x65, 0x73, 0x22, 0x76, 0x0a, 0x17, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x5b, + 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x54, 0x43, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x73, 0x22, 0x59, 0x0a, 0x18, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x42, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, + 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x9b, 0x03, 0x0a, 0x14, 0x42, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, + 0x51, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x66, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, + 0x6e, 0x75, 0x6c, 0x6c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, + 0x12, 0x44, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, + 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x12, 0x60, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x42, 0x9b, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x13, 0x43, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, + 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, + 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, + 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_computed_routes_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_computed_routes_proto_rawDescData = file_pbmesh_v1alpha1_computed_routes_proto_rawDesc +) + +func file_pbmesh_v1alpha1_computed_routes_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_computed_routes_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_computed_routes_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_computed_routes_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_computed_routes_proto_rawDescData +} + +var file_pbmesh_v1alpha1_computed_routes_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_pbmesh_v1alpha1_computed_routes_proto_goTypes = []interface{}{ + (*ComputedRoutes)(nil), // 0: hashicorp.consul.mesh.v1alpha1.ComputedRoutes + (*ComputedPortRoutes)(nil), // 1: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes + (*InterpretedHTTPRoute)(nil), // 2: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRoute + (*InterpretedHTTPRouteRule)(nil), // 3: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule + (*InterpretedHTTPBackendRef)(nil), // 4: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPBackendRef + (*InterpretedGRPCRoute)(nil), // 5: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRoute + (*InterpretedGRPCRouteRule)(nil), // 6: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule + (*InterpretedGRPCBackendRef)(nil), // 7: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCBackendRef + (*InterpretedTCPRoute)(nil), // 8: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRoute + (*InterpretedTCPRouteRule)(nil), // 9: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRouteRule + (*InterpretedTCPBackendRef)(nil), // 10: hashicorp.consul.mesh.v1alpha1.InterpretedTCPBackendRef + (*BackendTargetDetails)(nil), // 11: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails + nil, // 12: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry + nil, // 13: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry + (*ParentReference)(nil), // 14: hashicorp.consul.mesh.v1alpha1.ParentReference + (*HTTPRouteMatch)(nil), // 15: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch + (*HTTPRouteFilter)(nil), // 16: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + (*HTTPRouteTimeouts)(nil), // 17: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + (*HTTPRouteRetries)(nil), // 18: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + (*GRPCRouteMatch)(nil), // 19: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch + (*GRPCRouteFilter)(nil), // 20: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + (*BackendReference)(nil), // 21: hashicorp.consul.mesh.v1alpha1.BackendReference + (*v1alpha1.Service)(nil), // 22: hashicorp.consul.catalog.v1alpha1.Service + (*v1alpha1.FailoverPolicy)(nil), // 23: hashicorp.consul.catalog.v1alpha1.FailoverPolicy + (*DestinationPolicy)(nil), // 24: hashicorp.consul.mesh.v1alpha1.DestinationPolicy +} +var file_pbmesh_v1alpha1_computed_routes_proto_depIdxs = []int32{ + 12, // 0: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.ported_configs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry + 2, // 1: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.http:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRoute + 5, // 2: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.grpc:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRoute + 8, // 3: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.tcp:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedTCPRoute + 13, // 4: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.targets:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry + 14, // 5: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRoute.parent_ref:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference + 3, // 6: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule + 15, // 7: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch + 16, // 8: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + 4, // 9: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedHTTPBackendRef + 17, // 10: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + 18, // 11: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + 16, // 12: hashicorp.consul.mesh.v1alpha1.InterpretedHTTPBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + 14, // 13: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRoute.parent_ref:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference + 6, // 14: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule + 19, // 15: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch + 20, // 16: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + 7, // 17: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedGRPCBackendRef + 17, // 18: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + 18, // 19: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + 20, // 20: hashicorp.consul.mesh.v1alpha1.InterpretedGRPCBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + 14, // 21: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRoute.parent_ref:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference + 9, // 22: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedTCPRouteRule + 10, // 23: hashicorp.consul.mesh.v1alpha1.InterpretedTCPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.InterpretedTCPBackendRef + 21, // 24: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference + 22, // 25: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.service:type_name -> hashicorp.consul.catalog.v1alpha1.Service + 23, // 26: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.failover_policy:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverPolicy + 24, // 27: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.destination_policy:type_name -> hashicorp.consul.mesh.v1alpha1.DestinationPolicy + 1, // 28: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes + 11, // 29: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.BackendTargetDetails + 30, // [30:30] is the sub-list for method output_type + 30, // [30:30] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_computed_routes_proto_init() } +func file_pbmesh_v1alpha1_computed_routes_proto_init() { + if File_pbmesh_v1alpha1_computed_routes_proto != nil { + return + } + file_pbmesh_v1alpha1_common_proto_init() + file_pbmesh_v1alpha1_destination_policy_proto_init() + file_pbmesh_v1alpha1_grpc_route_proto_init() + file_pbmesh_v1alpha1_http_route_proto_init() + file_pbmesh_v1alpha1_http_route_retries_proto_init() + file_pbmesh_v1alpha1_http_route_timeouts_proto_init() + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComputedRoutes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComputedPortRoutes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedHTTPRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedHTTPRouteRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedHTTPBackendRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedGRPCRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedGRPCRouteRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedGRPCBackendRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedTCPRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedTCPRouteRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InterpretedTCPBackendRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BackendTargetDetails); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_pbmesh_v1alpha1_computed_routes_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*ComputedPortRoutes_Http)(nil), + (*ComputedPortRoutes_Grpc)(nil), + (*ComputedPortRoutes_Tcp)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_computed_routes_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_computed_routes_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_computed_routes_proto_depIdxs, + MessageInfos: file_pbmesh_v1alpha1_computed_routes_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_computed_routes_proto = out.File + file_pbmesh_v1alpha1_computed_routes_proto_rawDesc = nil + file_pbmesh_v1alpha1_computed_routes_proto_goTypes = nil + file_pbmesh_v1alpha1_computed_routes_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/computed_routes.proto b/proto-public/pbmesh/v1alpha1/computed_routes.proto new file mode 100644 index 000000000000..d48d417d6823 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/computed_routes.proto @@ -0,0 +1,99 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.mesh.v1alpha1; + +import "pbcatalog/v1alpha1/failover_policy.proto"; +import "pbcatalog/v1alpha1/service.proto"; +import "pbmesh/v1alpha1/common.proto"; +import "pbmesh/v1alpha1/destination_policy.proto"; +import "pbmesh/v1alpha1/grpc_route.proto"; +import "pbmesh/v1alpha1/http_route.proto"; +import "pbmesh/v1alpha1/http_route_retries.proto"; +import "pbmesh/v1alpha1/http_route_timeouts.proto"; + +// This is a Resource type. +message ComputedRoutes { + map ported_configs = 1; +} + +message ComputedPortRoutes { + oneof config { + InterpretedHTTPRoute http = 1; + InterpretedGRPCRoute grpc = 2; + InterpretedTCPRoute tcp = 3; + } + bool using_default_config = 4; // TODO + + // map key is an opaque string; like disco chain target name + map targets = 5; +} + +message InterpretedHTTPRoute { + ParentReference parent_ref = 1; + reserved 2; // hostnames + repeated InterpretedHTTPRouteRule rules = 3; +} + +message InterpretedHTTPRouteRule { + repeated HTTPRouteMatch matches = 1; + repeated HTTPRouteFilter filters = 2; + repeated InterpretedHTTPBackendRef backend_refs = 3; + HTTPRouteTimeouts timeouts = 4; + HTTPRouteRetries retries = 5; +} + +message InterpretedHTTPBackendRef { + string backend_target = 1; + uint32 weight = 2; + repeated HTTPRouteFilter filters = 3; +} + +message InterpretedGRPCRoute { + ParentReference parent_ref = 1; + reserved 2; // hostnames + repeated InterpretedGRPCRouteRule rules = 3; +} + +message InterpretedGRPCRouteRule { + repeated GRPCRouteMatch matches = 1; + repeated GRPCRouteFilter filters = 2; + repeated InterpretedGRPCBackendRef backend_refs = 3; + HTTPRouteTimeouts timeouts = 4; + HTTPRouteRetries retries = 5; +} + +message InterpretedGRPCBackendRef { + string backend_target = 1; + uint32 weight = 2; + repeated GRPCRouteFilter filters = 3; +} + +message InterpretedTCPRoute { + ParentReference parent_ref = 1; + repeated InterpretedTCPRouteRule rules = 2; +} + +message InterpretedTCPRouteRule { + repeated InterpretedTCPBackendRef backend_refs = 1; +} + +// TODO: look into smuggling the target through a different typeURL, or just +// skip in favor of letting the caller do their own lookups? +message InterpretedTCPBackendRef { + string backend_target = 1; + uint32 weight = 2; +} + +message BackendTargetDetails { + // identity info + BackendReference backend_ref = 1; + + bool null_route_traffic = 2; + + hashicorp.consul.catalog.v1alpha1.Service service = 3; + hashicorp.consul.catalog.v1alpha1.FailoverPolicy failover_policy = 4; + DestinationPolicy destination_policy = 5; +} diff --git a/proto-public/pbmesh/v1alpha1/connection.pb.go b/proto-public/pbmesh/v1alpha1/connection.pb.go index 65fa3ba329dd..221845b26dbb 100644 --- a/proto-public/pbmesh/v1alpha1/connection.pb.go +++ b/proto-public/pbmesh/v1alpha1/connection.pb.go @@ -12,6 +12,7 @@ package meshv1alpha1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" reflect "reflect" sync "sync" ) @@ -70,13 +71,14 @@ func (BalanceConnections) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v1alpha1_connection_proto_rawDescGZIP(), []int{0} } +// Referenced by ProxyConfiguration type ConnectionConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConnectTimeoutMs uint64 `protobuf:"varint,2,opt,name=connect_timeout_ms,json=connectTimeoutMs,proto3" json:"connect_timeout_ms,omitempty"` - RequestTimeoutMs uint64 `protobuf:"varint,3,opt,name=request_timeout_ms,json=requestTimeoutMs,proto3" json:"request_timeout_ms,omitempty"` + ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` + RequestTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` } func (x *ConnectionConfig) Reset() { @@ -111,20 +113,21 @@ func (*ConnectionConfig) Descriptor() ([]byte, []int) { return file_pbmesh_v1alpha1_connection_proto_rawDescGZIP(), []int{0} } -func (x *ConnectionConfig) GetConnectTimeoutMs() uint64 { +func (x *ConnectionConfig) GetConnectTimeout() *durationpb.Duration { if x != nil { - return x.ConnectTimeoutMs + return x.ConnectTimeout } - return 0 + return nil } -func (x *ConnectionConfig) GetRequestTimeoutMs() uint64 { +func (x *ConnectionConfig) GetRequestTimeout() *durationpb.Duration { if x != nil { - return x.RequestTimeoutMs + return x.RequestTimeout } - return 0 + return nil } +// Referenced by ProxyConfiguration type InboundConnectionsConfig struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -187,50 +190,54 @@ var file_pbmesh_v1alpha1_connection_proto_rawDesc = []byte{ 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x22, 0x6e, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x4d, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x4d, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x18, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, - 0x36, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x15, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x1b, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x68, - 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, - 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x19, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x54, 0x0a, 0x12, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, - 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, - 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x4f, - 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x10, - 0x01, 0x42, 0x97, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, - 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, - 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, - 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, - 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, - 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, + 0xc6, 0x01, 0x0a, 0x18, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x36, 0x0a, 0x17, + 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x6d, + 0x61, 0x78, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x1b, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, + 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x19, 0x62, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x54, 0x0a, 0x12, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, + 0x0a, 0x1b, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, + 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, + 0x1d, 0x0a, 0x19, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x10, 0x01, 0x42, 0x97, + 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, + 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -251,14 +258,17 @@ var file_pbmesh_v1alpha1_connection_proto_goTypes = []interface{}{ (BalanceConnections)(0), // 0: hashicorp.consul.mesh.v1alpha1.BalanceConnections (*ConnectionConfig)(nil), // 1: hashicorp.consul.mesh.v1alpha1.ConnectionConfig (*InboundConnectionsConfig)(nil), // 2: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig + (*durationpb.Duration)(nil), // 3: google.protobuf.Duration } var file_pbmesh_v1alpha1_connection_proto_depIdxs = []int32{ - 0, // 0: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig.balance_inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.BalanceConnections - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 3, // 0: hashicorp.consul.mesh.v1alpha1.ConnectionConfig.connect_timeout:type_name -> google.protobuf.Duration + 3, // 1: hashicorp.consul.mesh.v1alpha1.ConnectionConfig.request_timeout:type_name -> google.protobuf.Duration + 0, // 2: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig.balance_inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.BalanceConnections + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_pbmesh_v1alpha1_connection_proto_init() } diff --git a/proto-public/pbmesh/v1alpha1/connection.proto b/proto-public/pbmesh/v1alpha1/connection.proto index 1d054e503b30..8cae7c1c1099 100644 --- a/proto-public/pbmesh/v1alpha1/connection.proto +++ b/proto-public/pbmesh/v1alpha1/connection.proto @@ -5,11 +5,15 @@ syntax = "proto3"; package hashicorp.consul.mesh.v1alpha1; +import "google/protobuf/duration.proto"; + +// Referenced by ProxyConfiguration message ConnectionConfig { - uint64 connect_timeout_ms = 2; - uint64 request_timeout_ms = 3; + google.protobuf.Duration connect_timeout = 1; + google.protobuf.Duration request_timeout = 2; } +// Referenced by ProxyConfiguration message InboundConnectionsConfig { uint64 max_inbound_connections = 12; BalanceConnections balance_inbound_connections = 13; diff --git a/proto-public/pbmesh/v1alpha1/destination_policy.pb.binary.go b/proto-public/pbmesh/v1alpha1/destination_policy.pb.binary.go new file mode 100644 index 000000000000..e77b66710870 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/destination_policy.pb.binary.go @@ -0,0 +1,88 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbmesh/v1alpha1/destination_policy.proto + +package meshv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *DestinationPolicy) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *DestinationPolicy) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *DestinationConfig) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *DestinationConfig) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *LocalityPrioritization) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *LocalityPrioritization) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *LoadBalancer) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *LoadBalancer) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *RingHashConfig) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *RingHashConfig) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *LeastRequestConfig) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *LeastRequestConfig) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HashPolicy) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HashPolicy) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *CookieConfig) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *CookieConfig) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/destination_policy.pb.go b/proto-public/pbmesh/v1alpha1/destination_policy.pb.go new file mode 100644 index 000000000000..44a3049d5eb2 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/destination_policy.pb.go @@ -0,0 +1,1091 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/destination_policy.proto + +package meshv1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type LocalityPrioritizationMode int32 + +const ( + LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED LocalityPrioritizationMode = 0 + LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_NONE LocalityPrioritizationMode = 1 + LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_FAILOVER LocalityPrioritizationMode = 2 +) + +// Enum value maps for LocalityPrioritizationMode. +var ( + LocalityPrioritizationMode_name = map[int32]string{ + 0: "LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED", + 1: "LOCALITY_PRIORITIZATION_MODE_NONE", + 2: "LOCALITY_PRIORITIZATION_MODE_FAILOVER", + } + LocalityPrioritizationMode_value = map[string]int32{ + "LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED": 0, + "LOCALITY_PRIORITIZATION_MODE_NONE": 1, + "LOCALITY_PRIORITIZATION_MODE_FAILOVER": 2, + } +) + +func (x LocalityPrioritizationMode) Enum() *LocalityPrioritizationMode { + p := new(LocalityPrioritizationMode) + *p = x + return p +} + +func (x LocalityPrioritizationMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LocalityPrioritizationMode) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[0].Descriptor() +} + +func (LocalityPrioritizationMode) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[0] +} + +func (x LocalityPrioritizationMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LocalityPrioritizationMode.Descriptor instead. +func (LocalityPrioritizationMode) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{0} +} + +type LoadBalancerPolicy int32 + +const ( + LoadBalancerPolicy_LOAD_BALANCER_POLICY_UNSPECIFIED LoadBalancerPolicy = 0 + LoadBalancerPolicy_LOAD_BALANCER_POLICY_RANDOM LoadBalancerPolicy = 1 + LoadBalancerPolicy_LOAD_BALANCER_POLICY_ROUND_ROBIN LoadBalancerPolicy = 2 + LoadBalancerPolicy_LOAD_BALANCER_POLICY_LEAST_REQUEST LoadBalancerPolicy = 3 + LoadBalancerPolicy_LOAD_BALANCER_POLICY_MAGLEV LoadBalancerPolicy = 4 + LoadBalancerPolicy_LOAD_BALANCER_POLICY_RING_HASH LoadBalancerPolicy = 5 +) + +// Enum value maps for LoadBalancerPolicy. +var ( + LoadBalancerPolicy_name = map[int32]string{ + 0: "LOAD_BALANCER_POLICY_UNSPECIFIED", + 1: "LOAD_BALANCER_POLICY_RANDOM", + 2: "LOAD_BALANCER_POLICY_ROUND_ROBIN", + 3: "LOAD_BALANCER_POLICY_LEAST_REQUEST", + 4: "LOAD_BALANCER_POLICY_MAGLEV", + 5: "LOAD_BALANCER_POLICY_RING_HASH", + } + LoadBalancerPolicy_value = map[string]int32{ + "LOAD_BALANCER_POLICY_UNSPECIFIED": 0, + "LOAD_BALANCER_POLICY_RANDOM": 1, + "LOAD_BALANCER_POLICY_ROUND_ROBIN": 2, + "LOAD_BALANCER_POLICY_LEAST_REQUEST": 3, + "LOAD_BALANCER_POLICY_MAGLEV": 4, + "LOAD_BALANCER_POLICY_RING_HASH": 5, + } +) + +func (x LoadBalancerPolicy) Enum() *LoadBalancerPolicy { + p := new(LoadBalancerPolicy) + *p = x + return p +} + +func (x LoadBalancerPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LoadBalancerPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[1].Descriptor() +} + +func (LoadBalancerPolicy) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[1] +} + +func (x LoadBalancerPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LoadBalancerPolicy.Descriptor instead. +func (LoadBalancerPolicy) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{1} +} + +type HashPolicyField int32 + +const ( + HashPolicyField_HASH_POLICY_FIELD_UNSPECIFIED HashPolicyField = 0 + HashPolicyField_HASH_POLICY_FIELD_HEADER HashPolicyField = 1 + HashPolicyField_HASH_POLICY_FIELD_COOKIE HashPolicyField = 2 + HashPolicyField_HASH_POLICY_FIELD_QUERY_PARAMETER HashPolicyField = 3 +) + +// Enum value maps for HashPolicyField. +var ( + HashPolicyField_name = map[int32]string{ + 0: "HASH_POLICY_FIELD_UNSPECIFIED", + 1: "HASH_POLICY_FIELD_HEADER", + 2: "HASH_POLICY_FIELD_COOKIE", + 3: "HASH_POLICY_FIELD_QUERY_PARAMETER", + } + HashPolicyField_value = map[string]int32{ + "HASH_POLICY_FIELD_UNSPECIFIED": 0, + "HASH_POLICY_FIELD_HEADER": 1, + "HASH_POLICY_FIELD_COOKIE": 2, + "HASH_POLICY_FIELD_QUERY_PARAMETER": 3, + } +) + +func (x HashPolicyField) Enum() *HashPolicyField { + p := new(HashPolicyField) + *p = x + return p +} + +func (x HashPolicyField) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HashPolicyField) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[2].Descriptor() +} + +func (HashPolicyField) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_destination_policy_proto_enumTypes[2] +} + +func (x HashPolicyField) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HashPolicyField.Descriptor instead. +func (HashPolicyField) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{2} +} + +// DestinationPolicy is the destination-controlled set of defaults that +// are used when similar controls defined in an UpstreamConfig are left +// unspecified. +// +// Users may wish to share commonly configured settings for communicating with +// a service in one place, but yet retain the ability to tweak those on a +// client-by-client basis, which is why there are separate resources to control +// the definition of these values from either end of the connection. +// +// This is a Resource type. +type DestinationPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PortConfigs map[string]*DestinationConfig `protobuf:"bytes,1,rep,name=port_configs,json=portConfigs,proto3" json:"port_configs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *DestinationPolicy) Reset() { + *x = DestinationPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationPolicy) ProtoMessage() {} + +func (x *DestinationPolicy) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationPolicy.ProtoReflect.Descriptor instead. +func (*DestinationPolicy) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{0} +} + +func (x *DestinationPolicy) GetPortConfigs() map[string]*DestinationConfig { + if x != nil { + return x.PortConfigs + } + return nil +} + +type DestinationConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ConnectTimeout is the timeout for establishing new network connections + // to this service. + ConnectTimeout *durationpb.Duration `protobuf:"bytes,1,opt,name=connect_timeout,json=connectTimeout,proto3" json:"connect_timeout,omitempty"` + // RequestTimeout is the timeout for an HTTP request to complete before the + // connection is automatically terminated. If unspecified, defaults to 15 + // seconds. + RequestTimeout *durationpb.Duration `protobuf:"bytes,2,opt,name=request_timeout,json=requestTimeout,proto3" json:"request_timeout,omitempty"` + // LoadBalancer determines the load balancing policy and configuration for + // services issuing requests to this upstream service. + LoadBalancer *LoadBalancer `protobuf:"bytes,3,opt,name=load_balancer,json=loadBalancer,proto3" json:"load_balancer,omitempty"` + // LocalityPrioritization controls whether the locality of services within the + // local partition will be used to prioritize connectivity. + LocalityPrioritization *LocalityPrioritization `protobuf:"bytes,4,opt,name=locality_prioritization,json=localityPrioritization,proto3" json:"locality_prioritization,omitempty"` +} + +func (x *DestinationConfig) Reset() { + *x = DestinationConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DestinationConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DestinationConfig) ProtoMessage() {} + +func (x *DestinationConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DestinationConfig.ProtoReflect.Descriptor instead. +func (*DestinationConfig) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{1} +} + +func (x *DestinationConfig) GetConnectTimeout() *durationpb.Duration { + if x != nil { + return x.ConnectTimeout + } + return nil +} + +func (x *DestinationConfig) GetRequestTimeout() *durationpb.Duration { + if x != nil { + return x.RequestTimeout + } + return nil +} + +func (x *DestinationConfig) GetLoadBalancer() *LoadBalancer { + if x != nil { + return x.LoadBalancer + } + return nil +} + +func (x *DestinationConfig) GetLocalityPrioritization() *LocalityPrioritization { + if x != nil { + return x.LocalityPrioritization + } + return nil +} + +type LocalityPrioritization struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Mode specifies the type of prioritization that will be performed + // when selecting nodes in the local partition. + // Valid values are: "" (default "none"), "none", and "failover". + Mode LocalityPrioritizationMode `protobuf:"varint,1,opt,name=mode,proto3,enum=hashicorp.consul.mesh.v1alpha1.LocalityPrioritizationMode" json:"mode,omitempty"` +} + +func (x *LocalityPrioritization) Reset() { + *x = LocalityPrioritization{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LocalityPrioritization) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LocalityPrioritization) ProtoMessage() {} + +func (x *LocalityPrioritization) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LocalityPrioritization.ProtoReflect.Descriptor instead. +func (*LocalityPrioritization) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{2} +} + +func (x *LocalityPrioritization) GetMode() LocalityPrioritizationMode { + if x != nil { + return x.Mode + } + return LocalityPrioritizationMode_LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED +} + +// LoadBalancer determines the load balancing policy and configuration +// for services issuing requests to this upstream service. +type LoadBalancer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Policy is the load balancing policy used to select a host + Policy LoadBalancerPolicy `protobuf:"varint,1,opt,name=policy,proto3,enum=hashicorp.consul.mesh.v1alpha1.LoadBalancerPolicy" json:"policy,omitempty"` + // HashPolicies is a list of hash policies to use for hashing load balancing + // algorithms. Hash policies are evaluated individually and combined such + // that identical lists result in the same hash. + // + // If no hash policies are present, or none are successfully evaluated, + // then a random backend host will be selected. + HashPolicies []*HashPolicy `protobuf:"bytes,2,rep,name=hash_policies,json=hashPolicies,proto3" json:"hash_policies,omitempty"` + // Types that are assignable to Config: + // + // *LoadBalancer_RingHashConfig + // *LoadBalancer_LeastRequestConfig + Config isLoadBalancer_Config `protobuf_oneof:"config"` +} + +func (x *LoadBalancer) Reset() { + *x = LoadBalancer{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoadBalancer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadBalancer) ProtoMessage() {} + +func (x *LoadBalancer) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LoadBalancer.ProtoReflect.Descriptor instead. +func (*LoadBalancer) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{3} +} + +func (x *LoadBalancer) GetPolicy() LoadBalancerPolicy { + if x != nil { + return x.Policy + } + return LoadBalancerPolicy_LOAD_BALANCER_POLICY_UNSPECIFIED +} + +func (x *LoadBalancer) GetHashPolicies() []*HashPolicy { + if x != nil { + return x.HashPolicies + } + return nil +} + +func (m *LoadBalancer) GetConfig() isLoadBalancer_Config { + if m != nil { + return m.Config + } + return nil +} + +func (x *LoadBalancer) GetRingHashConfig() *RingHashConfig { + if x, ok := x.GetConfig().(*LoadBalancer_RingHashConfig); ok { + return x.RingHashConfig + } + return nil +} + +func (x *LoadBalancer) GetLeastRequestConfig() *LeastRequestConfig { + if x, ok := x.GetConfig().(*LoadBalancer_LeastRequestConfig); ok { + return x.LeastRequestConfig + } + return nil +} + +type isLoadBalancer_Config interface { + isLoadBalancer_Config() +} + +type LoadBalancer_RingHashConfig struct { + // RingHashConfig contains configuration for the "ring_hash" policy type + RingHashConfig *RingHashConfig `protobuf:"bytes,3,opt,name=ring_hash_config,json=ringHashConfig,proto3,oneof"` +} + +type LoadBalancer_LeastRequestConfig struct { + // LeastRequestConfig contains configuration for the "least_request" policy type + LeastRequestConfig *LeastRequestConfig `protobuf:"bytes,4,opt,name=least_request_config,json=leastRequestConfig,proto3,oneof"` +} + +func (*LoadBalancer_RingHashConfig) isLoadBalancer_Config() {} + +func (*LoadBalancer_LeastRequestConfig) isLoadBalancer_Config() {} + +// RingHashConfig contains configuration for the "ring_hash" policy type +type RingHashConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // MinimumRingSize determines the minimum number of entries in the hash ring + MinimumRingSize uint64 `protobuf:"varint,1,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` + // MaximumRingSize determines the maximum number of entries in the hash ring + MaximumRingSize uint64 `protobuf:"varint,2,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` +} + +func (x *RingHashConfig) Reset() { + *x = RingHashConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RingHashConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RingHashConfig) ProtoMessage() {} + +func (x *RingHashConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RingHashConfig.ProtoReflect.Descriptor instead. +func (*RingHashConfig) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{4} +} + +func (x *RingHashConfig) GetMinimumRingSize() uint64 { + if x != nil { + return x.MinimumRingSize + } + return 0 +} + +func (x *RingHashConfig) GetMaximumRingSize() uint64 { + if x != nil { + return x.MaximumRingSize + } + return 0 +} + +// LeastRequestConfig contains configuration for the "least_request" policy type +type LeastRequestConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ChoiceCount determines the number of random healthy hosts from which to select the one with the least requests. + ChoiceCount uint32 `protobuf:"varint,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` +} + +func (x *LeastRequestConfig) Reset() { + *x = LeastRequestConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LeastRequestConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LeastRequestConfig) ProtoMessage() {} + +func (x *LeastRequestConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LeastRequestConfig.ProtoReflect.Descriptor instead. +func (*LeastRequestConfig) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{5} +} + +func (x *LeastRequestConfig) GetChoiceCount() uint32 { + if x != nil { + return x.ChoiceCount + } + return 0 +} + +// HashPolicy defines which attributes will be hashed by hash-based LB algorithms +type HashPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field is the attribute type to hash on. + // Must be one of "header","cookie", or "query_parameter". + // Cannot be specified along with SourceIP. + Field HashPolicyField `protobuf:"varint,1,opt,name=field,proto3,enum=hashicorp.consul.mesh.v1alpha1.HashPolicyField" json:"field,omitempty"` + // FieldValue is the value to hash. + // ie. header name, cookie name, URL query parameter name + // Cannot be specified along with SourceIP. + FieldValue string `protobuf:"bytes,2,opt,name=field_value,json=fieldValue,proto3" json:"field_value,omitempty"` + // CookieConfig contains configuration for the "cookie" hash policy type. + CookieConfig *CookieConfig `protobuf:"bytes,3,opt,name=cookie_config,json=cookieConfig,proto3" json:"cookie_config,omitempty"` + // SourceIP determines whether the hash should be of the source IP rather than of a field and field value. + // Cannot be specified along with Field or FieldValue. + SourceIp bool `protobuf:"varint,4,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` + // Terminal will short circuit the computation of the hash when multiple hash policies are present. + // If a hash is computed when a Terminal policy is evaluated, + // then that hash will be used and subsequent hash policies will be ignored. + Terminal bool `protobuf:"varint,5,opt,name=terminal,proto3" json:"terminal,omitempty"` +} + +func (x *HashPolicy) Reset() { + *x = HashPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HashPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HashPolicy) ProtoMessage() {} + +func (x *HashPolicy) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HashPolicy.ProtoReflect.Descriptor instead. +func (*HashPolicy) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{6} +} + +func (x *HashPolicy) GetField() HashPolicyField { + if x != nil { + return x.Field + } + return HashPolicyField_HASH_POLICY_FIELD_UNSPECIFIED +} + +func (x *HashPolicy) GetFieldValue() string { + if x != nil { + return x.FieldValue + } + return "" +} + +func (x *HashPolicy) GetCookieConfig() *CookieConfig { + if x != nil { + return x.CookieConfig + } + return nil +} + +func (x *HashPolicy) GetSourceIp() bool { + if x != nil { + return x.SourceIp + } + return false +} + +func (x *HashPolicy) GetTerminal() bool { + if x != nil { + return x.Terminal + } + return false +} + +// CookieConfig contains configuration for the "cookie" hash policy type. +// This is specified to have Envoy generate a cookie for a client on its first request. +type CookieConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Generates a session cookie with no expiration. + Session bool `protobuf:"varint,1,opt,name=session,proto3" json:"session,omitempty"` + // TTL for generated cookies. Cannot be specified for session cookies. + Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"` + // The path to set for the cookie + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *CookieConfig) Reset() { + *x = CookieConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CookieConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CookieConfig) ProtoMessage() {} + +func (x *CookieConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CookieConfig.ProtoReflect.Descriptor instead. +func (*CookieConfig) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP(), []int{7} +} + +func (x *CookieConfig) GetSession() bool { + if x != nil { + return x.Session + } + return false +} + +func (x *CookieConfig) GetTtl() *durationpb.Duration { + if x != nil { + return x.Ttl + } + return nil +} + +func (x *CookieConfig) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +var File_pbmesh_v1alpha1_destination_policy_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_destination_policy_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x01, 0x0a, 0x11, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x12, 0x65, 0x0a, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x70, 0x6f, 0x72, 0x74, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x1a, 0x71, 0x0a, 0x10, 0x50, 0x6f, 0x72, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x47, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xdf, 0x02, 0x0a, 0x11, 0x44, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x42, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x51, 0x0a, 0x0d, 0x6c, 0x6f, 0x61, 0x64, + 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x0c, 0x6c, + 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x17, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x68, 0x0a, 0x16, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, + 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0xf9, 0x02, 0x0a, 0x0c, 0x4c, 0x6f, 0x61, 0x64, 0x42, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x4f, 0x0a, 0x0d, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x61, 0x73, 0x68, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x69, 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x10, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, + 0x52, 0x0e, 0x72, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x12, 0x66, 0x0a, 0x14, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x48, 0x00, 0x52, 0x12, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x22, 0x68, 0x0a, 0x0e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, + 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x37, 0x0a, 0x12, + 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x80, 0x02, 0x0a, 0x0a, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, + 0x6c, 0x69, 0x63, 0x79, 0x12, 0x45, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x51, 0x0a, 0x0d, + 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0c, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x1a, 0x0a, 0x08, + 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x22, 0x69, 0x0a, 0x0c, 0x43, 0x6f, 0x6f, 0x6b, + 0x69, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x2a, 0x9c, 0x01, 0x0a, 0x1a, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, + 0x50, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, + 0x64, 0x65, 0x12, 0x2c, 0x0a, 0x28, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, + 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, + 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x25, 0x0a, 0x21, 0x4c, 0x4f, 0x43, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, + 0x4f, 0x52, 0x49, 0x54, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, + 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x25, 0x4c, 0x4f, 0x43, 0x41, 0x4c, + 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x4f, 0x52, 0x49, 0x54, 0x49, 0x5a, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x4f, 0x56, 0x45, 0x52, + 0x10, 0x02, 0x2a, 0xee, 0x01, 0x0a, 0x12, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x72, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x4f, 0x41, + 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, + 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x1f, 0x0a, 0x1b, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x10, 0x01, + 0x12, 0x24, 0x0a, 0x20, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, + 0x52, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, + 0x4f, 0x42, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, + 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4c, + 0x45, 0x41, 0x53, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x03, 0x12, 0x1f, + 0x0a, 0x1b, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, 0x5f, + 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x4d, 0x41, 0x47, 0x4c, 0x45, 0x56, 0x10, 0x04, 0x12, + 0x22, 0x0a, 0x1e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x52, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x41, 0x53, + 0x48, 0x10, 0x05, 0x2a, 0x97, 0x01, 0x0a, 0x0f, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x21, 0x0a, 0x1d, 0x48, 0x41, 0x53, 0x48, 0x5f, + 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x41, + 0x53, 0x48, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, + 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x41, 0x53, 0x48, + 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x43, 0x4f, + 0x4f, 0x4b, 0x49, 0x45, 0x10, 0x02, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x50, + 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x51, 0x55, 0x45, 0x52, + 0x59, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x10, 0x03, 0x42, 0x9e, 0x02, + 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x42, 0x16, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, + 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, + 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, + 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, + 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_destination_policy_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_destination_policy_proto_rawDescData = file_pbmesh_v1alpha1_destination_policy_proto_rawDesc +) + +func file_pbmesh_v1alpha1_destination_policy_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_destination_policy_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_destination_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_destination_policy_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_destination_policy_proto_rawDescData +} + +var file_pbmesh_v1alpha1_destination_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_pbmesh_v1alpha1_destination_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_pbmesh_v1alpha1_destination_policy_proto_goTypes = []interface{}{ + (LocalityPrioritizationMode)(0), // 0: hashicorp.consul.mesh.v1alpha1.LocalityPrioritizationMode + (LoadBalancerPolicy)(0), // 1: hashicorp.consul.mesh.v1alpha1.LoadBalancerPolicy + (HashPolicyField)(0), // 2: hashicorp.consul.mesh.v1alpha1.HashPolicyField + (*DestinationPolicy)(nil), // 3: hashicorp.consul.mesh.v1alpha1.DestinationPolicy + (*DestinationConfig)(nil), // 4: hashicorp.consul.mesh.v1alpha1.DestinationConfig + (*LocalityPrioritization)(nil), // 5: hashicorp.consul.mesh.v1alpha1.LocalityPrioritization + (*LoadBalancer)(nil), // 6: hashicorp.consul.mesh.v1alpha1.LoadBalancer + (*RingHashConfig)(nil), // 7: hashicorp.consul.mesh.v1alpha1.RingHashConfig + (*LeastRequestConfig)(nil), // 8: hashicorp.consul.mesh.v1alpha1.LeastRequestConfig + (*HashPolicy)(nil), // 9: hashicorp.consul.mesh.v1alpha1.HashPolicy + (*CookieConfig)(nil), // 10: hashicorp.consul.mesh.v1alpha1.CookieConfig + nil, // 11: hashicorp.consul.mesh.v1alpha1.DestinationPolicy.PortConfigsEntry + (*durationpb.Duration)(nil), // 12: google.protobuf.Duration +} +var file_pbmesh_v1alpha1_destination_policy_proto_depIdxs = []int32{ + 11, // 0: hashicorp.consul.mesh.v1alpha1.DestinationPolicy.port_configs:type_name -> hashicorp.consul.mesh.v1alpha1.DestinationPolicy.PortConfigsEntry + 12, // 1: hashicorp.consul.mesh.v1alpha1.DestinationConfig.connect_timeout:type_name -> google.protobuf.Duration + 12, // 2: hashicorp.consul.mesh.v1alpha1.DestinationConfig.request_timeout:type_name -> google.protobuf.Duration + 6, // 3: hashicorp.consul.mesh.v1alpha1.DestinationConfig.load_balancer:type_name -> hashicorp.consul.mesh.v1alpha1.LoadBalancer + 5, // 4: hashicorp.consul.mesh.v1alpha1.DestinationConfig.locality_prioritization:type_name -> hashicorp.consul.mesh.v1alpha1.LocalityPrioritization + 0, // 5: hashicorp.consul.mesh.v1alpha1.LocalityPrioritization.mode:type_name -> hashicorp.consul.mesh.v1alpha1.LocalityPrioritizationMode + 1, // 6: hashicorp.consul.mesh.v1alpha1.LoadBalancer.policy:type_name -> hashicorp.consul.mesh.v1alpha1.LoadBalancerPolicy + 9, // 7: hashicorp.consul.mesh.v1alpha1.LoadBalancer.hash_policies:type_name -> hashicorp.consul.mesh.v1alpha1.HashPolicy + 7, // 8: hashicorp.consul.mesh.v1alpha1.LoadBalancer.ring_hash_config:type_name -> hashicorp.consul.mesh.v1alpha1.RingHashConfig + 8, // 9: hashicorp.consul.mesh.v1alpha1.LoadBalancer.least_request_config:type_name -> hashicorp.consul.mesh.v1alpha1.LeastRequestConfig + 2, // 10: hashicorp.consul.mesh.v1alpha1.HashPolicy.field:type_name -> hashicorp.consul.mesh.v1alpha1.HashPolicyField + 10, // 11: hashicorp.consul.mesh.v1alpha1.HashPolicy.cookie_config:type_name -> hashicorp.consul.mesh.v1alpha1.CookieConfig + 12, // 12: hashicorp.consul.mesh.v1alpha1.CookieConfig.ttl:type_name -> google.protobuf.Duration + 4, // 13: hashicorp.consul.mesh.v1alpha1.DestinationPolicy.PortConfigsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.DestinationConfig + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_destination_policy_proto_init() } +func file_pbmesh_v1alpha1_destination_policy_proto_init() { + if File_pbmesh_v1alpha1_destination_policy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DestinationConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocalityPrioritization); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LoadBalancer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RingHashConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LeastRequestConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HashPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CookieConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_pbmesh_v1alpha1_destination_policy_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*LoadBalancer_RingHashConfig)(nil), + (*LoadBalancer_LeastRequestConfig)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_destination_policy_proto_rawDesc, + NumEnums: 3, + NumMessages: 9, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_destination_policy_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_destination_policy_proto_depIdxs, + EnumInfos: file_pbmesh_v1alpha1_destination_policy_proto_enumTypes, + MessageInfos: file_pbmesh_v1alpha1_destination_policy_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_destination_policy_proto = out.File + file_pbmesh_v1alpha1_destination_policy_proto_rawDesc = nil + file_pbmesh_v1alpha1_destination_policy_proto_goTypes = nil + file_pbmesh_v1alpha1_destination_policy_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/destination_policy.proto b/proto-public/pbmesh/v1alpha1/destination_policy.proto new file mode 100644 index 000000000000..cc03f38d8c05 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/destination_policy.proto @@ -0,0 +1,147 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.mesh.v1alpha1; + +import "google/protobuf/duration.proto"; + +// DestinationPolicy is the destination-controlled set of defaults that +// are used when similar controls defined in an UpstreamConfig are left +// unspecified. +// +// Users may wish to share commonly configured settings for communicating with +// a service in one place, but yet retain the ability to tweak those on a +// client-by-client basis, which is why there are separate resources to control +// the definition of these values from either end of the connection. +// +// This is a Resource type. +message DestinationPolicy { + map port_configs = 1; +} + +message DestinationConfig { + // ConnectTimeout is the timeout for establishing new network connections + // to this service. + google.protobuf.Duration connect_timeout = 1; + + // RequestTimeout is the timeout for an HTTP request to complete before the + // connection is automatically terminated. If unspecified, defaults to 15 + // seconds. + google.protobuf.Duration request_timeout = 2; + + // LoadBalancer determines the load balancing policy and configuration for + // services issuing requests to this upstream service. + LoadBalancer load_balancer = 3; + + // LocalityPrioritization controls whether the locality of services within the + // local partition will be used to prioritize connectivity. + LocalityPrioritization locality_prioritization = 4; +} + +message LocalityPrioritization { + // Mode specifies the type of prioritization that will be performed + // when selecting nodes in the local partition. + // Valid values are: "" (default "none"), "none", and "failover". + LocalityPrioritizationMode mode = 1; +} + +enum LocalityPrioritizationMode { + LOCALITY_PRIORITIZATION_MODE_UNSPECIFIED = 0; + LOCALITY_PRIORITIZATION_MODE_NONE = 1; + LOCALITY_PRIORITIZATION_MODE_FAILOVER = 2; +} + +// LoadBalancer determines the load balancing policy and configuration +// for services issuing requests to this upstream service. +// +message LoadBalancer { + // Policy is the load balancing policy used to select a host + LoadBalancerPolicy policy = 1; + + // HashPolicies is a list of hash policies to use for hashing load balancing + // algorithms. Hash policies are evaluated individually and combined such + // that identical lists result in the same hash. + // + // If no hash policies are present, or none are successfully evaluated, + // then a random backend host will be selected. + repeated HashPolicy hash_policies = 2; + + oneof config { + // RingHashConfig contains configuration for the "ring_hash" policy type + RingHashConfig ring_hash_config = 3; + + // LeastRequestConfig contains configuration for the "least_request" policy type + LeastRequestConfig least_request_config = 4; + } +} + +enum LoadBalancerPolicy { + LOAD_BALANCER_POLICY_UNSPECIFIED = 0; + LOAD_BALANCER_POLICY_RANDOM = 1; + LOAD_BALANCER_POLICY_ROUND_ROBIN = 2; + LOAD_BALANCER_POLICY_LEAST_REQUEST = 3; + LOAD_BALANCER_POLICY_MAGLEV = 4; + LOAD_BALANCER_POLICY_RING_HASH = 5; +} + +// RingHashConfig contains configuration for the "ring_hash" policy type +message RingHashConfig { + // MinimumRingSize determines the minimum number of entries in the hash ring + uint64 minimum_ring_size = 1; + + // MaximumRingSize determines the maximum number of entries in the hash ring + uint64 maximum_ring_size = 2; +} + +// LeastRequestConfig contains configuration for the "least_request" policy type +message LeastRequestConfig { + // ChoiceCount determines the number of random healthy hosts from which to select the one with the least requests. + uint32 choice_count = 1; +} + +// HashPolicy defines which attributes will be hashed by hash-based LB algorithms +message HashPolicy { + // Field is the attribute type to hash on. + // Must be one of "header","cookie", or "query_parameter". + // Cannot be specified along with SourceIP. + HashPolicyField field = 1; + + // FieldValue is the value to hash. + // ie. header name, cookie name, URL query parameter name + // Cannot be specified along with SourceIP. + string field_value = 2; + + // CookieConfig contains configuration for the "cookie" hash policy type. + CookieConfig cookie_config = 3; + + // SourceIP determines whether the hash should be of the source IP rather than of a field and field value. + // Cannot be specified along with Field or FieldValue. + bool source_ip = 4; + + // Terminal will short circuit the computation of the hash when multiple hash policies are present. + // If a hash is computed when a Terminal policy is evaluated, + // then that hash will be used and subsequent hash policies will be ignored. + bool terminal = 5; +} + +enum HashPolicyField { + HASH_POLICY_FIELD_UNSPECIFIED = 0; + HASH_POLICY_FIELD_HEADER = 1; + HASH_POLICY_FIELD_COOKIE = 2; + HASH_POLICY_FIELD_QUERY_PARAMETER = 3; +} + +// CookieConfig contains configuration for the "cookie" hash policy type. +// This is specified to have Envoy generate a cookie for a client on its first request. +message CookieConfig { + // Generates a session cookie with no expiration. + bool session = 1; + + // TTL for generated cookies. Cannot be specified for session cookies. + google.protobuf.Duration ttl = 2; + + // The path to set for the cookie + string path = 3; +} diff --git a/proto-public/pbmesh/v1alpha1/grpc_route.pb.binary.go b/proto-public/pbmesh/v1alpha1/grpc_route.pb.binary.go new file mode 100644 index 000000000000..40efa6110d0b --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/grpc_route.pb.binary.go @@ -0,0 +1,78 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbmesh/v1alpha1/grpc_route.proto + +package meshv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *GRPCRoute) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *GRPCRoute) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *GRPCRouteRule) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *GRPCRouteRule) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *GRPCRouteMatch) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *GRPCRouteMatch) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *GRPCMethodMatch) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *GRPCMethodMatch) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *GRPCHeaderMatch) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *GRPCHeaderMatch) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *GRPCRouteFilter) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *GRPCRouteFilter) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *GRPCBackendRef) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *GRPCBackendRef) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/grpc_route.pb.go b/proto-public/pbmesh/v1alpha1/grpc_route.pb.go new file mode 100644 index 000000000000..2f25aae654e7 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/grpc_route.pb.go @@ -0,0 +1,887 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/grpc_route.proto + +package meshv1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GRPCMethodMatchType int32 + +const ( + GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_UNSPECIFIED GRPCMethodMatchType = 0 + GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_EXACT GRPCMethodMatchType = 1 + GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_REGEX GRPCMethodMatchType = 2 +) + +// Enum value maps for GRPCMethodMatchType. +var ( + GRPCMethodMatchType_name = map[int32]string{ + 0: "GRPC_METHOD_MATCH_TYPE_UNSPECIFIED", + 1: "GRPC_METHOD_MATCH_TYPE_EXACT", + 2: "GRPC_METHOD_MATCH_TYPE_REGEX", + } + GRPCMethodMatchType_value = map[string]int32{ + "GRPC_METHOD_MATCH_TYPE_UNSPECIFIED": 0, + "GRPC_METHOD_MATCH_TYPE_EXACT": 1, + "GRPC_METHOD_MATCH_TYPE_REGEX": 2, + } +) + +func (x GRPCMethodMatchType) Enum() *GRPCMethodMatchType { + p := new(GRPCMethodMatchType) + *p = x + return p +} + +func (x GRPCMethodMatchType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GRPCMethodMatchType) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_grpc_route_proto_enumTypes[0].Descriptor() +} + +func (GRPCMethodMatchType) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_grpc_route_proto_enumTypes[0] +} + +func (x GRPCMethodMatchType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GRPCMethodMatchType.Descriptor instead. +func (GRPCMethodMatchType) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{0} +} + +// NOTE: this should align to the GAMMA/gateway-api version, or at least be +// easily translatable. +// +// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.GRPCRoute +// +// This is a Resource type. +type GRPCRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ParentRefs references the resources (usually Gateways) that a Route wants + // to be attached to. Note that the referenced parent resource needs to allow + // this for the attachment to be complete. For Gateways, that means the + // Gateway needs to allow attachment from Routes of this kind and namespace. + // + // It is invalid to reference an identical parent more than once. It is valid + // to reference multiple distinct sections within the same parent resource, + // such as 2 Listeners within a Gateway. + ParentRefs []*ParentReference `protobuf:"bytes,1,rep,name=parent_refs,json=parentRefs,proto3" json:"parent_refs,omitempty"` + Hostnames []string `protobuf:"bytes,2,rep,name=hostnames,proto3" json:"hostnames,omitempty"` + // Rules are a list of GRPC matchers, filters and actions. + Rules []*GRPCRouteRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *GRPCRoute) Reset() { + *x = GRPCRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPCRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPCRoute) ProtoMessage() {} + +func (x *GRPCRoute) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GRPCRoute.ProtoReflect.Descriptor instead. +func (*GRPCRoute) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{0} +} + +func (x *GRPCRoute) GetParentRefs() []*ParentReference { + if x != nil { + return x.ParentRefs + } + return nil +} + +func (x *GRPCRoute) GetHostnames() []string { + if x != nil { + return x.Hostnames + } + return nil +} + +func (x *GRPCRoute) GetRules() []*GRPCRouteRule { + if x != nil { + return x.Rules + } + return nil +} + +type GRPCRouteRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Matches []*GRPCRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` + Filters []*GRPCRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + BackendRefs []*GRPCBackendRef `protobuf:"bytes,3,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` + // ALTERNATIVE: Timeouts defines the timeouts that can be configured for an HTTP request. + Timeouts *HTTPRouteTimeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"` + // ALTERNATIVE: + Retries *HTTPRouteRetries `protobuf:"bytes,5,opt,name=retries,proto3" json:"retries,omitempty"` +} + +func (x *GRPCRouteRule) Reset() { + *x = GRPCRouteRule{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPCRouteRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPCRouteRule) ProtoMessage() {} + +func (x *GRPCRouteRule) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GRPCRouteRule.ProtoReflect.Descriptor instead. +func (*GRPCRouteRule) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{1} +} + +func (x *GRPCRouteRule) GetMatches() []*GRPCRouteMatch { + if x != nil { + return x.Matches + } + return nil +} + +func (x *GRPCRouteRule) GetFilters() []*GRPCRouteFilter { + if x != nil { + return x.Filters + } + return nil +} + +func (x *GRPCRouteRule) GetBackendRefs() []*GRPCBackendRef { + if x != nil { + return x.BackendRefs + } + return nil +} + +func (x *GRPCRouteRule) GetTimeouts() *HTTPRouteTimeouts { + if x != nil { + return x.Timeouts + } + return nil +} + +func (x *GRPCRouteRule) GetRetries() *HTTPRouteRetries { + if x != nil { + return x.Retries + } + return nil +} + +type GRPCRouteMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Method specifies a gRPC request service/method matcher. If this field is + // not specified, all services and methods will match. + Method *GRPCMethodMatch `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` + // Headers specifies gRPC request header matchers. Multiple match values are + // ANDed together, meaning, a request MUST match all the specified headers to + // select the route. + Headers []*GRPCHeaderMatch `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` +} + +func (x *GRPCRouteMatch) Reset() { + *x = GRPCRouteMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPCRouteMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPCRouteMatch) ProtoMessage() {} + +func (x *GRPCRouteMatch) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GRPCRouteMatch.ProtoReflect.Descriptor instead. +func (*GRPCRouteMatch) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{2} +} + +func (x *GRPCRouteMatch) GetMethod() *GRPCMethodMatch { + if x != nil { + return x.Method + } + return nil +} + +func (x *GRPCRouteMatch) GetHeaders() []*GRPCHeaderMatch { + if x != nil { + return x.Headers + } + return nil +} + +type GRPCMethodMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type specifies how to match against the service and/or method. Support: + // Core (Exact with service and method specified) + Type GRPCMethodMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.GRPCMethodMatchType" json:"type,omitempty"` + // Value of the service to match against. If left empty or omitted, will + // match any service. + // + // At least one of Service and Method MUST be a non-empty string. + Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` + // Value of the method to match against. If left empty or omitted, will match + // all services. + // + // At least one of Service and Method MUST be a non-empty string.} + Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` +} + +func (x *GRPCMethodMatch) Reset() { + *x = GRPCMethodMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPCMethodMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPCMethodMatch) ProtoMessage() {} + +func (x *GRPCMethodMatch) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GRPCMethodMatch.ProtoReflect.Descriptor instead. +func (*GRPCMethodMatch) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{3} +} + +func (x *GRPCMethodMatch) GetType() GRPCMethodMatchType { + if x != nil { + return x.Type + } + return GRPCMethodMatchType_GRPC_METHOD_MATCH_TYPE_UNSPECIFIED +} + +func (x *GRPCMethodMatch) GetService() string { + if x != nil { + return x.Service + } + return "" +} + +func (x *GRPCMethodMatch) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +type GRPCHeaderMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type HeaderMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.HeaderMatchType" json:"type,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *GRPCHeaderMatch) Reset() { + *x = GRPCHeaderMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPCHeaderMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPCHeaderMatch) ProtoMessage() {} + +func (x *GRPCHeaderMatch) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GRPCHeaderMatch.ProtoReflect.Descriptor instead. +func (*GRPCHeaderMatch) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{4} +} + +func (x *GRPCHeaderMatch) GetType() HeaderMatchType { + if x != nil { + return x.Type + } + return HeaderMatchType_HEADER_MATCH_TYPE_UNSPECIFIED +} + +func (x *GRPCHeaderMatch) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GRPCHeaderMatch) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type GRPCRouteFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // RequestHeaderModifier defines a schema for a filter that modifies request + // headers. + RequestHeaderModifier *HTTPHeaderFilter `protobuf:"bytes,1,opt,name=request_header_modifier,json=requestHeaderModifier,proto3" json:"request_header_modifier,omitempty"` + // ResponseHeaderModifier defines a schema for a filter that modifies + // response headers. + ResponseHeaderModifier *HTTPHeaderFilter `protobuf:"bytes,2,opt,name=response_header_modifier,json=responseHeaderModifier,proto3" json:"response_header_modifier,omitempty"` + // URLRewrite defines a schema for a filter that modifies a request during + // forwarding. + UrlRewrite *HTTPURLRewriteFilter `protobuf:"bytes,5,opt,name=url_rewrite,json=urlRewrite,proto3" json:"url_rewrite,omitempty"` +} + +func (x *GRPCRouteFilter) Reset() { + *x = GRPCRouteFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPCRouteFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPCRouteFilter) ProtoMessage() {} + +func (x *GRPCRouteFilter) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GRPCRouteFilter.ProtoReflect.Descriptor instead. +func (*GRPCRouteFilter) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{5} +} + +func (x *GRPCRouteFilter) GetRequestHeaderModifier() *HTTPHeaderFilter { + if x != nil { + return x.RequestHeaderModifier + } + return nil +} + +func (x *GRPCRouteFilter) GetResponseHeaderModifier() *HTTPHeaderFilter { + if x != nil { + return x.ResponseHeaderModifier + } + return nil +} + +func (x *GRPCRouteFilter) GetUrlRewrite() *HTTPURLRewriteFilter { + if x != nil { + return x.UrlRewrite + } + return nil +} + +type GRPCBackendRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BackendRef *BackendReference `protobuf:"bytes,1,opt,name=backend_ref,json=backendRef,proto3" json:"backend_ref,omitempty"` + // Weight specifies the proportion of requests forwarded to the referenced + // backend. This is computed as weight/(sum of all weights in this + // BackendRefs list). For non-zero values, there may be some epsilon from the + // exact proportion defined here depending on the precision an implementation + // supports. Weight is not a percentage and the sum of weights does not need + // to equal 100. + // + // If only one backend is specified and it has a weight greater than 0, 100% + // of the traffic is forwarded to that backend. If weight is set to 0, no + // traffic should be forwarded for this entry. If unspecified, weight defaults + // to 1. + Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` + // Filters defined at this level should be executed if and only if the + // request is being forwarded to the backend defined here. + Filters []*GRPCRouteFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` +} + +func (x *GRPCBackendRef) Reset() { + *x = GRPCBackendRef{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GRPCBackendRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GRPCBackendRef) ProtoMessage() {} + +func (x *GRPCBackendRef) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GRPCBackendRef.ProtoReflect.Descriptor instead. +func (*GRPCBackendRef) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP(), []int{6} +} + +func (x *GRPCBackendRef) GetBackendRef() *BackendReference { + if x != nil { + return x.BackendRef + } + return nil +} + +func (x *GRPCBackendRef) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *GRPCBackendRef) GetFilters() []*GRPCRouteFilter { + if x != nil { + return x.Filters + } + return nil +} + +var File_pbmesh_v1alpha1_grpc_route_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_grpc_route_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x20, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70, 0x62, + 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, 0x74, + 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x09, 0x47, 0x52, 0x50, 0x43, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, + 0x72, 0x65, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x92, 0x03, 0x0a, 0x0d, 0x47, + 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x07, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, + 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x51, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x42, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x66, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, + 0xa4, 0x01, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, + 0x63, 0x68, 0x12, 0x47, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x49, 0x0a, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, + 0x50, 0x43, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x47, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x80, 0x01, 0x0a, 0x0f, 0x47, 0x52, 0x50, 0x43, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, + 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbe, 0x02, 0x0a, 0x0f, 0x47, 0x52, 0x50, + 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x68, 0x0a, 0x17, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, + 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, + 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, + 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, + 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x16, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x75, 0x72, 0x6c, 0x5f, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x55, 0x52, 0x4c, + 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x75, + 0x72, 0x6c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x47, 0x52, + 0x50, 0x43, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x51, 0x0a, 0x0b, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, + 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2a, 0x81, 0x01, 0x0a, 0x13, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x47, 0x52, + 0x50, 0x43, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, + 0x44, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, + 0x43, 0x54, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x4d, 0x45, 0x54, + 0x48, 0x4f, 0x44, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, + 0x45, 0x47, 0x45, 0x58, 0x10, 0x02, 0x42, 0x96, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x47, + 0x72, 0x70, 0x63, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, + 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, + 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, + 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_grpc_route_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_grpc_route_proto_rawDescData = file_pbmesh_v1alpha1_grpc_route_proto_rawDesc +) + +func file_pbmesh_v1alpha1_grpc_route_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_grpc_route_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_grpc_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_grpc_route_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_grpc_route_proto_rawDescData +} + +var file_pbmesh_v1alpha1_grpc_route_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_pbmesh_v1alpha1_grpc_route_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_pbmesh_v1alpha1_grpc_route_proto_goTypes = []interface{}{ + (GRPCMethodMatchType)(0), // 0: hashicorp.consul.mesh.v1alpha1.GRPCMethodMatchType + (*GRPCRoute)(nil), // 1: hashicorp.consul.mesh.v1alpha1.GRPCRoute + (*GRPCRouteRule)(nil), // 2: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule + (*GRPCRouteMatch)(nil), // 3: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch + (*GRPCMethodMatch)(nil), // 4: hashicorp.consul.mesh.v1alpha1.GRPCMethodMatch + (*GRPCHeaderMatch)(nil), // 5: hashicorp.consul.mesh.v1alpha1.GRPCHeaderMatch + (*GRPCRouteFilter)(nil), // 6: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + (*GRPCBackendRef)(nil), // 7: hashicorp.consul.mesh.v1alpha1.GRPCBackendRef + (*ParentReference)(nil), // 8: hashicorp.consul.mesh.v1alpha1.ParentReference + (*HTTPRouteTimeouts)(nil), // 9: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + (*HTTPRouteRetries)(nil), // 10: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + (HeaderMatchType)(0), // 11: hashicorp.consul.mesh.v1alpha1.HeaderMatchType + (*HTTPHeaderFilter)(nil), // 12: hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter + (*HTTPURLRewriteFilter)(nil), // 13: hashicorp.consul.mesh.v1alpha1.HTTPURLRewriteFilter + (*BackendReference)(nil), // 14: hashicorp.consul.mesh.v1alpha1.BackendReference +} +var file_pbmesh_v1alpha1_grpc_route_proto_depIdxs = []int32{ + 8, // 0: hashicorp.consul.mesh.v1alpha1.GRPCRoute.parent_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference + 2, // 1: hashicorp.consul.mesh.v1alpha1.GRPCRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteRule + 3, // 2: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch + 6, // 3: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + 7, // 4: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCBackendRef + 9, // 5: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + 10, // 6: hashicorp.consul.mesh.v1alpha1.GRPCRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + 4, // 7: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch.method:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCMethodMatch + 5, // 8: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch.headers:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCHeaderMatch + 0, // 9: hashicorp.consul.mesh.v1alpha1.GRPCMethodMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCMethodMatchType + 11, // 10: hashicorp.consul.mesh.v1alpha1.GRPCHeaderMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.HeaderMatchType + 12, // 11: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter.request_header_modifier:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter + 12, // 12: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter.response_header_modifier:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter + 13, // 13: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter.url_rewrite:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPURLRewriteFilter + 14, // 14: hashicorp.consul.mesh.v1alpha1.GRPCBackendRef.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference + 6, // 15: hashicorp.consul.mesh.v1alpha1.GRPCBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_grpc_route_proto_init() } +func file_pbmesh_v1alpha1_grpc_route_proto_init() { + if File_pbmesh_v1alpha1_grpc_route_proto != nil { + return + } + file_pbmesh_v1alpha1_common_proto_init() + file_pbmesh_v1alpha1_http_route_proto_init() + file_pbmesh_v1alpha1_http_route_retries_proto_init() + file_pbmesh_v1alpha1_http_route_timeouts_proto_init() + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPCRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPCRouteRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPCRouteMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPCMethodMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPCHeaderMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPCRouteFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_grpc_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GRPCBackendRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_grpc_route_proto_rawDesc, + NumEnums: 1, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_grpc_route_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_grpc_route_proto_depIdxs, + EnumInfos: file_pbmesh_v1alpha1_grpc_route_proto_enumTypes, + MessageInfos: file_pbmesh_v1alpha1_grpc_route_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_grpc_route_proto = out.File + file_pbmesh_v1alpha1_grpc_route_proto_rawDesc = nil + file_pbmesh_v1alpha1_grpc_route_proto_goTypes = nil + file_pbmesh_v1alpha1_grpc_route_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/grpc_route.proto b/proto-public/pbmesh/v1alpha1/grpc_route.proto new file mode 100644 index 000000000000..ce4ca4d917ca --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/grpc_route.proto @@ -0,0 +1,121 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.mesh.v1alpha1; + +import "pbmesh/v1alpha1/common.proto"; +import "pbmesh/v1alpha1/http_route.proto"; +import "pbmesh/v1alpha1/http_route_retries.proto"; +import "pbmesh/v1alpha1/http_route_timeouts.proto"; + +// NOTE: this should align to the GAMMA/gateway-api version, or at least be +// easily translatable. +// +// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.GRPCRoute +// +// This is a Resource type. +message GRPCRoute { + // ParentRefs references the resources (usually Gateways) that a Route wants + // to be attached to. Note that the referenced parent resource needs to allow + // this for the attachment to be complete. For Gateways, that means the + // Gateway needs to allow attachment from Routes of this kind and namespace. + // + // It is invalid to reference an identical parent more than once. It is valid + // to reference multiple distinct sections within the same parent resource, + // such as 2 Listeners within a Gateway. + repeated ParentReference parent_refs = 1; + + repeated string hostnames = 2; + + // Rules are a list of GRPC matchers, filters and actions. + repeated GRPCRouteRule rules = 3; +} + +message GRPCRouteRule { + repeated GRPCRouteMatch matches = 1; + repeated GRPCRouteFilter filters = 2; + repeated GRPCBackendRef backend_refs = 3; + + // ALTERNATIVE: Timeouts defines the timeouts that can be configured for an HTTP request. + HTTPRouteTimeouts timeouts = 4; + // ALTERNATIVE: + HTTPRouteRetries retries = 5; +} + +message GRPCRouteMatch { + // Method specifies a gRPC request service/method matcher. If this field is + // not specified, all services and methods will match. + GRPCMethodMatch method = 1; + + // Headers specifies gRPC request header matchers. Multiple match values are + // ANDed together, meaning, a request MUST match all the specified headers to + // select the route. + repeated GRPCHeaderMatch headers = 2; +} + +message GRPCMethodMatch { + // Type specifies how to match against the service and/or method. Support: + // Core (Exact with service and method specified) + GRPCMethodMatchType type = 1; + + // Value of the service to match against. If left empty or omitted, will + // match any service. + // + // At least one of Service and Method MUST be a non-empty string. + string service = 2; + + // Value of the method to match against. If left empty or omitted, will match + // all services. + // + // At least one of Service and Method MUST be a non-empty string.} + string method = 3; +} + +enum GRPCMethodMatchType { + GRPC_METHOD_MATCH_TYPE_UNSPECIFIED = 0; + GRPC_METHOD_MATCH_TYPE_EXACT = 1; + GRPC_METHOD_MATCH_TYPE_REGEX = 2; +} + +message GRPCHeaderMatch { + HeaderMatchType type = 1; + string name = 2; + string value = 3; +} + +message GRPCRouteFilter { + // RequestHeaderModifier defines a schema for a filter that modifies request + // headers. + HTTPHeaderFilter request_header_modifier = 1; + + // ResponseHeaderModifier defines a schema for a filter that modifies + // response headers. + HTTPHeaderFilter response_header_modifier = 2; + + // URLRewrite defines a schema for a filter that modifies a request during + // forwarding. + HTTPURLRewriteFilter url_rewrite = 5; +} + +message GRPCBackendRef { + BackendReference backend_ref = 1; + + // Weight specifies the proportion of requests forwarded to the referenced + // backend. This is computed as weight/(sum of all weights in this + // BackendRefs list). For non-zero values, there may be some epsilon from the + // exact proportion defined here depending on the precision an implementation + // supports. Weight is not a percentage and the sum of weights does not need + // to equal 100. + // + //If only one backend is specified and it has a weight greater than 0, 100% + //of the traffic is forwarded to that backend. If weight is set to 0, no + //traffic should be forwarded for this entry. If unspecified, weight defaults + //to 1. + uint32 weight = 2; + + // Filters defined at this level should be executed if and only if the + // request is being forwarded to the backend defined here. + repeated GRPCRouteFilter filters = 3; +} diff --git a/proto-public/pbmesh/v1alpha1/http_route.pb.binary.go b/proto-public/pbmesh/v1alpha1/http_route.pb.binary.go new file mode 100644 index 000000000000..81b3901a5bd9 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route.pb.binary.go @@ -0,0 +1,118 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbmesh/v1alpha1/http_route.proto + +package meshv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPRoute) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPRoute) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPRouteRule) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPRouteRule) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPRouteMatch) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPRouteMatch) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPPathMatch) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPPathMatch) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPHeaderMatch) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPHeaderMatch) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPQueryParamMatch) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPQueryParamMatch) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPRouteFilter) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPRouteFilter) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPHeaderFilter) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPHeaderFilter) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPHeader) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPHeader) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPURLRewriteFilter) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPURLRewriteFilter) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPBackendRef) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPBackendRef) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/http_route.pb.go b/proto-public/pbmesh/v1alpha1/http_route.pb.go new file mode 100644 index 000000000000..f69b84f22656 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route.pb.go @@ -0,0 +1,1441 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/http_route.proto + +package meshv1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// PathMatchType specifies the semantics of how HTTP paths should be compared. +// Valid PathMatchType values, along with their support levels, are: +// +// PathPrefix and Exact paths must be syntactically valid: +// +// - Must begin with the / character +// - Must not contain consecutive / characters (e.g. /foo///, //). +// - Note that values may be added to this enum, implementations must ensure that unknown values will not cause a crash. +// +// Unknown values here must result in the implementation setting the Accepted +// Condition for the Route to status: False, with a Reason of UnsupportedValue. +type PathMatchType int32 + +const ( + PathMatchType_PATH_MATCH_TYPE_UNSPECIFIED PathMatchType = 0 + PathMatchType_PATH_MATCH_TYPE_EXACT PathMatchType = 1 + PathMatchType_PATH_MATCH_TYPE_PREFIX PathMatchType = 2 + PathMatchType_PATH_MATCH_TYPE_REGEX PathMatchType = 3 +) + +// Enum value maps for PathMatchType. +var ( + PathMatchType_name = map[int32]string{ + 0: "PATH_MATCH_TYPE_UNSPECIFIED", + 1: "PATH_MATCH_TYPE_EXACT", + 2: "PATH_MATCH_TYPE_PREFIX", + 3: "PATH_MATCH_TYPE_REGEX", + } + PathMatchType_value = map[string]int32{ + "PATH_MATCH_TYPE_UNSPECIFIED": 0, + "PATH_MATCH_TYPE_EXACT": 1, + "PATH_MATCH_TYPE_PREFIX": 2, + "PATH_MATCH_TYPE_REGEX": 3, + } +) + +func (x PathMatchType) Enum() *PathMatchType { + p := new(PathMatchType) + *p = x + return p +} + +func (x PathMatchType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PathMatchType) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_http_route_proto_enumTypes[0].Descriptor() +} + +func (PathMatchType) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_http_route_proto_enumTypes[0] +} + +func (x PathMatchType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PathMatchType.Descriptor instead. +func (PathMatchType) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{0} +} + +// HeaderMatchType specifies the semantics of how HTTP header values should be +// compared. Valid HeaderMatchType values, along with their conformance levels, +// are: +// +// Note that values may be added to this enum, implementations must ensure that +// unknown values will not cause a crash. +// +// Unknown values here must result in the implementation setting the Accepted +// Condition for the Route to status: False, with a Reason of UnsupportedValue. +type HeaderMatchType int32 + +const ( + HeaderMatchType_HEADER_MATCH_TYPE_UNSPECIFIED HeaderMatchType = 0 + HeaderMatchType_HEADER_MATCH_TYPE_EXACT HeaderMatchType = 1 + HeaderMatchType_HEADER_MATCH_TYPE_REGEX HeaderMatchType = 2 + // consul only after this point (service-router compat) + HeaderMatchType_HEADER_MATCH_TYPE_PRESENT HeaderMatchType = 3 + HeaderMatchType_HEADER_MATCH_TYPE_PREFIX HeaderMatchType = 4 + HeaderMatchType_HEADER_MATCH_TYPE_SUFFIX HeaderMatchType = 5 +) + +// Enum value maps for HeaderMatchType. +var ( + HeaderMatchType_name = map[int32]string{ + 0: "HEADER_MATCH_TYPE_UNSPECIFIED", + 1: "HEADER_MATCH_TYPE_EXACT", + 2: "HEADER_MATCH_TYPE_REGEX", + 3: "HEADER_MATCH_TYPE_PRESENT", + 4: "HEADER_MATCH_TYPE_PREFIX", + 5: "HEADER_MATCH_TYPE_SUFFIX", + } + HeaderMatchType_value = map[string]int32{ + "HEADER_MATCH_TYPE_UNSPECIFIED": 0, + "HEADER_MATCH_TYPE_EXACT": 1, + "HEADER_MATCH_TYPE_REGEX": 2, + "HEADER_MATCH_TYPE_PRESENT": 3, + "HEADER_MATCH_TYPE_PREFIX": 4, + "HEADER_MATCH_TYPE_SUFFIX": 5, + } +) + +func (x HeaderMatchType) Enum() *HeaderMatchType { + p := new(HeaderMatchType) + *p = x + return p +} + +func (x HeaderMatchType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HeaderMatchType) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_http_route_proto_enumTypes[1].Descriptor() +} + +func (HeaderMatchType) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_http_route_proto_enumTypes[1] +} + +func (x HeaderMatchType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HeaderMatchType.Descriptor instead. +func (HeaderMatchType) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{1} +} + +type QueryParamMatchType int32 + +const ( + QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_UNSPECIFIED QueryParamMatchType = 0 + QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_EXACT QueryParamMatchType = 1 + QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_REGEX QueryParamMatchType = 2 + // consul only after this point (service-router compat) + QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_PRESENT QueryParamMatchType = 3 +) + +// Enum value maps for QueryParamMatchType. +var ( + QueryParamMatchType_name = map[int32]string{ + 0: "QUERY_PARAM_MATCH_TYPE_UNSPECIFIED", + 1: "QUERY_PARAM_MATCH_TYPE_EXACT", + 2: "QUERY_PARAM_MATCH_TYPE_REGEX", + 3: "QUERY_PARAM_MATCH_TYPE_PRESENT", + } + QueryParamMatchType_value = map[string]int32{ + "QUERY_PARAM_MATCH_TYPE_UNSPECIFIED": 0, + "QUERY_PARAM_MATCH_TYPE_EXACT": 1, + "QUERY_PARAM_MATCH_TYPE_REGEX": 2, + "QUERY_PARAM_MATCH_TYPE_PRESENT": 3, + } +) + +func (x QueryParamMatchType) Enum() *QueryParamMatchType { + p := new(QueryParamMatchType) + *p = x + return p +} + +func (x QueryParamMatchType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (QueryParamMatchType) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_http_route_proto_enumTypes[2].Descriptor() +} + +func (QueryParamMatchType) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_http_route_proto_enumTypes[2] +} + +func (x QueryParamMatchType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use QueryParamMatchType.Descriptor instead. +func (QueryParamMatchType) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{2} +} + +// NOTE: this should align to the GAMMA/gateway-api version, or at least be +// easily translatable. +// +// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.HTTPRoute +// +// This is a Resource type. +type HTTPRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ParentRefs references the resources (usually Gateways) that a Route wants + // to be attached to. Note that the referenced parent resource needs to allow + // this for the attachment to be complete. For Gateways, that means the + // Gateway needs to allow attachment from Routes of this kind and namespace. + // + // It is invalid to reference an identical parent more than once. It is valid + // to reference multiple distinct sections within the same parent resource, + // such as 2 Listeners within a Gateway. + ParentRefs []*ParentReference `protobuf:"bytes,1,rep,name=parent_refs,json=parentRefs,proto3" json:"parent_refs,omitempty"` + // Hostnames are the hostnames for which this HTTPRoute should respond to requests. + Hostnames []string `protobuf:"bytes,2,rep,name=hostnames,proto3" json:"hostnames,omitempty"` + // Rules are a list of HTTP-based routing rules that this route should + // use for constructing a routing table. + Rules []*HTTPRouteRule `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *HTTPRoute) Reset() { + *x = HTTPRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPRoute) ProtoMessage() {} + +func (x *HTTPRoute) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPRoute.ProtoReflect.Descriptor instead. +func (*HTTPRoute) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{0} +} + +func (x *HTTPRoute) GetParentRefs() []*ParentReference { + if x != nil { + return x.ParentRefs + } + return nil +} + +func (x *HTTPRoute) GetHostnames() []string { + if x != nil { + return x.Hostnames + } + return nil +} + +func (x *HTTPRoute) GetRules() []*HTTPRouteRule { + if x != nil { + return x.Rules + } + return nil +} + +// HTTPRouteRule specifies the routing rules used to determine what upstream +// service an HTTP request is routed to. +type HTTPRouteRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Matches specified the matching criteria used in the routing table. If a + // request matches the given HTTPMatch configuration, then traffic is routed + // to services specified in the Services field. + Matches []*HTTPRouteMatch `protobuf:"bytes,1,rep,name=matches,proto3" json:"matches,omitempty"` + Filters []*HTTPRouteFilter `protobuf:"bytes,2,rep,name=filters,proto3" json:"filters,omitempty"` + // BackendRefs defines the backend(s) where matching requests should be sent. + // + // Failure behavior here depends on how many BackendRefs are specified and + // how many are invalid. + // + // If all entries in BackendRefs are invalid, and there are also no filters + // specified in this route rule, all traffic which matches this rule MUST + // receive a 500 status code. + // + // See the HTTPBackendRef definition for the rules about what makes a single + // HTTPBackendRef invalid. + // + // When a HTTPBackendRef is invalid, 500 status codes MUST be returned for + // requests that would have otherwise been routed to an invalid backend. If + // multiple backends are specified, and some are invalid, the proportion of + // requests that would otherwise have been routed to an invalid backend MUST + // receive a 500 status code. + // + // For example, if two backends are specified with equal weights, and one is + // invalid, 50 percent of traffic must receive a 500. Implementations may + // choose how that 50 percent is determined. + BackendRefs []*HTTPBackendRef `protobuf:"bytes,3,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` + // ALTERNATIVE: Timeouts defines the timeouts that can be configured for an HTTP request. + Timeouts *HTTPRouteTimeouts `protobuf:"bytes,4,opt,name=timeouts,proto3" json:"timeouts,omitempty"` + // ALTERNATIVE: + Retries *HTTPRouteRetries `protobuf:"bytes,5,opt,name=retries,proto3" json:"retries,omitempty"` +} + +func (x *HTTPRouteRule) Reset() { + *x = HTTPRouteRule{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPRouteRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPRouteRule) ProtoMessage() {} + +func (x *HTTPRouteRule) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPRouteRule.ProtoReflect.Descriptor instead. +func (*HTTPRouteRule) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{1} +} + +func (x *HTTPRouteRule) GetMatches() []*HTTPRouteMatch { + if x != nil { + return x.Matches + } + return nil +} + +func (x *HTTPRouteRule) GetFilters() []*HTTPRouteFilter { + if x != nil { + return x.Filters + } + return nil +} + +func (x *HTTPRouteRule) GetBackendRefs() []*HTTPBackendRef { + if x != nil { + return x.BackendRefs + } + return nil +} + +func (x *HTTPRouteRule) GetTimeouts() *HTTPRouteTimeouts { + if x != nil { + return x.Timeouts + } + return nil +} + +func (x *HTTPRouteRule) GetRetries() *HTTPRouteRetries { + if x != nil { + return x.Retries + } + return nil +} + +type HTTPRouteMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Path specifies a HTTP request path matcher. If this field is not + // specified, a default prefix match on the “/” path is provided. + Path *HTTPPathMatch `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // Headers specifies HTTP request header matchers. Multiple match values are + // ANDed together, meaning, a request must match all the specified headers to + // select the route. + Headers []*HTTPHeaderMatch `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"` + // QueryParams specifies HTTP query parameter matchers. Multiple match values + // are ANDed together, meaning, a request must match all the specified query + // parameters to select the route. + QueryParams []*HTTPQueryParamMatch `protobuf:"bytes,3,rep,name=query_params,json=queryParams,proto3" json:"query_params,omitempty"` + // Method specifies HTTP method matcher. When specified, this route will be + // matched only if the request has the specified method. + Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"` +} + +func (x *HTTPRouteMatch) Reset() { + *x = HTTPRouteMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPRouteMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPRouteMatch) ProtoMessage() {} + +func (x *HTTPRouteMatch) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPRouteMatch.ProtoReflect.Descriptor instead. +func (*HTTPRouteMatch) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{2} +} + +func (x *HTTPRouteMatch) GetPath() *HTTPPathMatch { + if x != nil { + return x.Path + } + return nil +} + +func (x *HTTPRouteMatch) GetHeaders() []*HTTPHeaderMatch { + if x != nil { + return x.Headers + } + return nil +} + +func (x *HTTPRouteMatch) GetQueryParams() []*HTTPQueryParamMatch { + if x != nil { + return x.QueryParams + } + return nil +} + +func (x *HTTPRouteMatch) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +type HTTPPathMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type specifies how to match against the path Value. + Type PathMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.PathMatchType" json:"type,omitempty"` + // Value of the HTTP path to match against. + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *HTTPPathMatch) Reset() { + *x = HTTPPathMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPPathMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPPathMatch) ProtoMessage() {} + +func (x *HTTPPathMatch) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPPathMatch.ProtoReflect.Descriptor instead. +func (*HTTPPathMatch) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{3} +} + +func (x *HTTPPathMatch) GetType() PathMatchType { + if x != nil { + return x.Type + } + return PathMatchType_PATH_MATCH_TYPE_UNSPECIFIED +} + +func (x *HTTPPathMatch) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type HTTPHeaderMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type specifies how to match against the value of the header. + Type HeaderMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.HeaderMatchType" json:"type,omitempty"` + // Name is the name of the HTTP Header to be matched. Name matching MUST be + // case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). + // + // If multiple entries specify equivalent header names, only the first entry + // with an equivalent name MUST be considered for a match. Subsequent entries + // with an equivalent header name MUST be ignored. Due to the + // case-insensitivity of header names, “foo” and “Foo” are considered + // equivalent. + // + // When a header is repeated in an HTTP request, it is + // implementation-specific behavior as to how this is represented. Generally, + // proxies should follow the guidance from the RFC: + // https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 regarding + // processing a repeated header, with special handling for “Set-Cookie”. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Value is the value of HTTP Header to be matched. + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // NOTE: not in gamma; service-router compat + Invert bool `protobuf:"varint,4,opt,name=invert,proto3" json:"invert,omitempty"` +} + +func (x *HTTPHeaderMatch) Reset() { + *x = HTTPHeaderMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPHeaderMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPHeaderMatch) ProtoMessage() {} + +func (x *HTTPHeaderMatch) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPHeaderMatch.ProtoReflect.Descriptor instead. +func (*HTTPHeaderMatch) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{4} +} + +func (x *HTTPHeaderMatch) GetType() HeaderMatchType { + if x != nil { + return x.Type + } + return HeaderMatchType_HEADER_MATCH_TYPE_UNSPECIFIED +} + +func (x *HTTPHeaderMatch) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *HTTPHeaderMatch) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +func (x *HTTPHeaderMatch) GetInvert() bool { + if x != nil { + return x.Invert + } + return false +} + +type HTTPQueryParamMatch struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Type specifies how to match against the value of the query parameter. + Type QueryParamMatchType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.QueryParamMatchType" json:"type,omitempty"` + // Name is the name of the HTTP query param to be matched. This must be an + // exact string match. (See + // https://tools.ietf.org/html/rfc7230#section-2.7.3). + // + // If multiple entries specify equivalent query param names, only the first + // entry with an equivalent name MUST be considered for a match. Subsequent + // entries with an equivalent query param name MUST be ignored. + // + // If a query param is repeated in an HTTP request, the behavior is purposely + // left undefined, since different data planes have different capabilities. + // However, it is recommended that implementations should match against the + // first value of the param if the data plane supports it, as this behavior + // is expected in other load balancing contexts outside of the Gateway API. + // + // Users SHOULD NOT route traffic based on repeated query params to guard + // themselves against potential differences in the implementations. + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Value is the value of HTTP query param to be matched. + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *HTTPQueryParamMatch) Reset() { + *x = HTTPQueryParamMatch{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPQueryParamMatch) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPQueryParamMatch) ProtoMessage() {} + +func (x *HTTPQueryParamMatch) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPQueryParamMatch.ProtoReflect.Descriptor instead. +func (*HTTPQueryParamMatch) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{5} +} + +func (x *HTTPQueryParamMatch) GetType() QueryParamMatchType { + if x != nil { + return x.Type + } + return QueryParamMatchType_QUERY_PARAM_MATCH_TYPE_UNSPECIFIED +} + +func (x *HTTPQueryParamMatch) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *HTTPQueryParamMatch) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type HTTPRouteFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // RequestHeaderModifier defines a schema for a filter that modifies request + // headers. + RequestHeaderModifier *HTTPHeaderFilter `protobuf:"bytes,1,opt,name=request_header_modifier,json=requestHeaderModifier,proto3" json:"request_header_modifier,omitempty"` + // ResponseHeaderModifier defines a schema for a filter that modifies + // response headers. + ResponseHeaderModifier *HTTPHeaderFilter `protobuf:"bytes,2,opt,name=response_header_modifier,json=responseHeaderModifier,proto3" json:"response_header_modifier,omitempty"` + // URLRewrite defines a schema for a filter that modifies a request during + // forwarding. + UrlRewrite *HTTPURLRewriteFilter `protobuf:"bytes,5,opt,name=url_rewrite,json=urlRewrite,proto3" json:"url_rewrite,omitempty"` +} + +func (x *HTTPRouteFilter) Reset() { + *x = HTTPRouteFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPRouteFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPRouteFilter) ProtoMessage() {} + +func (x *HTTPRouteFilter) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPRouteFilter.ProtoReflect.Descriptor instead. +func (*HTTPRouteFilter) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{6} +} + +func (x *HTTPRouteFilter) GetRequestHeaderModifier() *HTTPHeaderFilter { + if x != nil { + return x.RequestHeaderModifier + } + return nil +} + +func (x *HTTPRouteFilter) GetResponseHeaderModifier() *HTTPHeaderFilter { + if x != nil { + return x.ResponseHeaderModifier + } + return nil +} + +func (x *HTTPRouteFilter) GetUrlRewrite() *HTTPURLRewriteFilter { + if x != nil { + return x.UrlRewrite + } + return nil +} + +type HTTPHeaderFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Set overwrites the request with the given header (name, value) before the + // action. + Set []*HTTPHeader `protobuf:"bytes,1,rep,name=set,proto3" json:"set,omitempty"` + // Add adds the given header(s) (name, value) to the request before the + // action. It appends to any existing values associated with the header name. + Add []*HTTPHeader `protobuf:"bytes,2,rep,name=add,proto3" json:"add,omitempty"` + // Remove the given header(s) from the HTTP request before the action. The + // value of Remove is a list of HTTP header names. Note that the header names + // are case-insensitive (see + // https://datatracker.ietf.org/doc/html/rfc2616#section-4.2). + Remove []string `protobuf:"bytes,3,rep,name=remove,proto3" json:"remove,omitempty"` +} + +func (x *HTTPHeaderFilter) Reset() { + *x = HTTPHeaderFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPHeaderFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPHeaderFilter) ProtoMessage() {} + +func (x *HTTPHeaderFilter) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPHeaderFilter.ProtoReflect.Descriptor instead. +func (*HTTPHeaderFilter) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{7} +} + +func (x *HTTPHeaderFilter) GetSet() []*HTTPHeader { + if x != nil { + return x.Set + } + return nil +} + +func (x *HTTPHeaderFilter) GetAdd() []*HTTPHeader { + if x != nil { + return x.Add + } + return nil +} + +func (x *HTTPHeaderFilter) GetRemove() []string { + if x != nil { + return x.Remove + } + return nil +} + +type HTTPHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *HTTPHeader) Reset() { + *x = HTTPHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPHeader) ProtoMessage() {} + +func (x *HTTPHeader) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPHeader.ProtoReflect.Descriptor instead. +func (*HTTPHeader) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{8} +} + +func (x *HTTPHeader) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *HTTPHeader) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type HTTPURLRewriteFilter struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PathPrefix string `protobuf:"bytes,1,opt,name=path_prefix,json=pathPrefix,proto3" json:"path_prefix,omitempty"` +} + +func (x *HTTPURLRewriteFilter) Reset() { + *x = HTTPURLRewriteFilter{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPURLRewriteFilter) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPURLRewriteFilter) ProtoMessage() {} + +func (x *HTTPURLRewriteFilter) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPURLRewriteFilter.ProtoReflect.Descriptor instead. +func (*HTTPURLRewriteFilter) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{9} +} + +func (x *HTTPURLRewriteFilter) GetPathPrefix() string { + if x != nil { + return x.PathPrefix + } + return "" +} + +type HTTPBackendRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BackendRef *BackendReference `protobuf:"bytes,1,opt,name=backend_ref,json=backendRef,proto3" json:"backend_ref,omitempty"` + // Weight specifies the proportion of requests forwarded to the referenced + // backend. This is computed as weight/(sum of all weights in this + // BackendRefs list). For non-zero values, there may be some epsilon from the + // exact proportion defined here depending on the precision an implementation + // supports. Weight is not a percentage and the sum of weights does not need + // to equal 100. + // + // If only one backend is specified and it has a weight greater than 0, 100% + // of the traffic is forwarded to that backend. If weight is set to 0, no + // traffic should be forwarded for this entry. If unspecified, weight defaults + // to 1. + Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` + // Filters defined at this level should be executed if and only if the + // request is being forwarded to the backend defined here. + Filters []*HTTPRouteFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"` +} + +func (x *HTTPBackendRef) Reset() { + *x = HTTPBackendRef{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPBackendRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPBackendRef) ProtoMessage() {} + +func (x *HTTPBackendRef) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPBackendRef.ProtoReflect.Descriptor instead. +func (*HTTPBackendRef) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP(), []int{10} +} + +func (x *HTTPBackendRef) GetBackendRef() *BackendReference { + if x != nil { + return x.BackendRef + } + return nil +} + +func (x *HTTPBackendRef) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +func (x *HTTPBackendRef) GetFilters() []*HTTPRouteFilter { + if x != nil { + return x.Filters + } + return nil +} + +var File_pbmesh_v1alpha1_http_route_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_http_route_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x29, 0x70, 0x62, 0x6d, 0x65, + 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, + 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, + 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x66, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, + 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x92, 0x03, 0x0a, 0x0d, 0x48, 0x54, 0x54, + 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, + 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, + 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6d, 0x61, 0x74, + 0x63, 0x68, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x51, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, + 0x66, 0x73, 0x12, 0x4d, 0x0a, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x73, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x73, 0x12, 0x4a, 0x0a, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0x8e, 0x02, + 0x0a, 0x0e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x12, 0x41, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x49, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x56, + 0x0a, 0x0c, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x68, + 0x0a, 0x0d, 0x48, 0x54, 0x54, 0x50, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, + 0x41, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x48, 0x54, 0x54, + 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x6e, 0x76, 0x65, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, + 0x65, 0x72, 0x74, 0x22, 0x88, 0x01, 0x0a, 0x13, 0x48, 0x54, 0x54, 0x50, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x47, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbe, + 0x02, 0x0a, 0x0f, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x12, 0x68, 0x0a, 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x18, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, + 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x52, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x75, 0x72, 0x6c, 0x5f, + 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, + 0x54, 0x54, 0x50, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x46, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x52, 0x0a, 0x75, 0x72, 0x6c, 0x52, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22, + 0xa6, 0x01, 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x03, 0x73, + 0x65, 0x74, 0x12, 0x3c, 0x0a, 0x03, 0x61, 0x64, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2a, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x48, 0x54, 0x54, 0x50, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x03, 0x61, 0x64, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x22, 0x36, 0x0a, 0x0a, 0x48, 0x54, 0x54, 0x50, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x22, 0x37, 0x0a, 0x14, 0x48, 0x54, 0x54, 0x50, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x77, 0x72, 0x69, + 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x61, 0x74, 0x68, + 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x61, 0x74, 0x68, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0xc6, 0x01, 0x0a, 0x0e, 0x48, 0x54, + 0x54, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x51, 0x0a, 0x0b, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, + 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x49, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x73, 0x2a, 0x82, 0x01, 0x0a, 0x0d, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x41, 0x54, + 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x41, + 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x10, 0x01, + 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, + 0x50, 0x41, 0x54, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x52, 0x45, 0x47, 0x45, 0x58, 0x10, 0x03, 0x2a, 0xc9, 0x01, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x48, + 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, + 0x0a, 0x17, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x41, 0x43, 0x54, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x48, + 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x52, 0x45, 0x47, 0x45, 0x58, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x48, 0x45, 0x41, 0x44, + 0x45, 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, + 0x45, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, 0x44, 0x45, + 0x52, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x52, 0x45, + 0x46, 0x49, 0x58, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, + 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x46, 0x46, 0x49, + 0x58, 0x10, 0x05, 0x2a, 0xa5, 0x01, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x51, + 0x55, 0x45, 0x52, 0x59, 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x50, 0x41, 0x52, + 0x41, 0x4d, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, + 0x41, 0x43, 0x54, 0x10, 0x01, 0x12, 0x20, 0x0a, 0x1c, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x50, + 0x41, 0x52, 0x41, 0x4d, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x52, 0x45, 0x47, 0x45, 0x58, 0x10, 0x02, 0x12, 0x22, 0x0a, 0x1e, 0x51, 0x55, 0x45, 0x52, 0x59, + 0x5f, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x03, 0x42, 0x96, 0x02, 0x0a, 0x22, + 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x42, 0x0e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, + 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, + 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, + 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, + 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_http_route_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_http_route_proto_rawDescData = file_pbmesh_v1alpha1_http_route_proto_rawDesc +) + +func file_pbmesh_v1alpha1_http_route_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_http_route_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_http_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_http_route_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_http_route_proto_rawDescData +} + +var file_pbmesh_v1alpha1_http_route_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_pbmesh_v1alpha1_http_route_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_pbmesh_v1alpha1_http_route_proto_goTypes = []interface{}{ + (PathMatchType)(0), // 0: hashicorp.consul.mesh.v1alpha1.PathMatchType + (HeaderMatchType)(0), // 1: hashicorp.consul.mesh.v1alpha1.HeaderMatchType + (QueryParamMatchType)(0), // 2: hashicorp.consul.mesh.v1alpha1.QueryParamMatchType + (*HTTPRoute)(nil), // 3: hashicorp.consul.mesh.v1alpha1.HTTPRoute + (*HTTPRouteRule)(nil), // 4: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule + (*HTTPRouteMatch)(nil), // 5: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch + (*HTTPPathMatch)(nil), // 6: hashicorp.consul.mesh.v1alpha1.HTTPPathMatch + (*HTTPHeaderMatch)(nil), // 7: hashicorp.consul.mesh.v1alpha1.HTTPHeaderMatch + (*HTTPQueryParamMatch)(nil), // 8: hashicorp.consul.mesh.v1alpha1.HTTPQueryParamMatch + (*HTTPRouteFilter)(nil), // 9: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + (*HTTPHeaderFilter)(nil), // 10: hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter + (*HTTPHeader)(nil), // 11: hashicorp.consul.mesh.v1alpha1.HTTPHeader + (*HTTPURLRewriteFilter)(nil), // 12: hashicorp.consul.mesh.v1alpha1.HTTPURLRewriteFilter + (*HTTPBackendRef)(nil), // 13: hashicorp.consul.mesh.v1alpha1.HTTPBackendRef + (*ParentReference)(nil), // 14: hashicorp.consul.mesh.v1alpha1.ParentReference + (*HTTPRouteTimeouts)(nil), // 15: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + (*HTTPRouteRetries)(nil), // 16: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + (*BackendReference)(nil), // 17: hashicorp.consul.mesh.v1alpha1.BackendReference +} +var file_pbmesh_v1alpha1_http_route_proto_depIdxs = []int32{ + 14, // 0: hashicorp.consul.mesh.v1alpha1.HTTPRoute.parent_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference + 4, // 1: hashicorp.consul.mesh.v1alpha1.HTTPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRule + 5, // 2: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch + 9, // 3: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + 13, // 4: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPBackendRef + 15, // 5: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + 16, // 6: hashicorp.consul.mesh.v1alpha1.HTTPRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + 6, // 7: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch.path:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPPathMatch + 7, // 8: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch.headers:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderMatch + 8, // 9: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch.query_params:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPQueryParamMatch + 0, // 10: hashicorp.consul.mesh.v1alpha1.HTTPPathMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.PathMatchType + 1, // 11: hashicorp.consul.mesh.v1alpha1.HTTPHeaderMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.HeaderMatchType + 2, // 12: hashicorp.consul.mesh.v1alpha1.HTTPQueryParamMatch.type:type_name -> hashicorp.consul.mesh.v1alpha1.QueryParamMatchType + 10, // 13: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter.request_header_modifier:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter + 10, // 14: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter.response_header_modifier:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter + 12, // 15: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter.url_rewrite:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPURLRewriteFilter + 11, // 16: hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter.set:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeader + 11, // 17: hashicorp.consul.mesh.v1alpha1.HTTPHeaderFilter.add:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPHeader + 17, // 18: hashicorp.consul.mesh.v1alpha1.HTTPBackendRef.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference + 9, // 19: hashicorp.consul.mesh.v1alpha1.HTTPBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_http_route_proto_init() } +func file_pbmesh_v1alpha1_http_route_proto_init() { + if File_pbmesh_v1alpha1_http_route_proto != nil { + return + } + file_pbmesh_v1alpha1_common_proto_init() + file_pbmesh_v1alpha1_http_route_retries_proto_init() + file_pbmesh_v1alpha1_http_route_timeouts_proto_init() + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_http_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPRouteRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPRouteMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPPathMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPHeaderMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPQueryParamMatch); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPRouteFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPHeaderFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPURLRewriteFilter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_http_route_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPBackendRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_http_route_proto_rawDesc, + NumEnums: 3, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_http_route_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_http_route_proto_depIdxs, + EnumInfos: file_pbmesh_v1alpha1_http_route_proto_enumTypes, + MessageInfos: file_pbmesh_v1alpha1_http_route_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_http_route_proto = out.File + file_pbmesh_v1alpha1_http_route_proto_rawDesc = nil + file_pbmesh_v1alpha1_http_route_proto_goTypes = nil + file_pbmesh_v1alpha1_http_route_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/http_route.proto b/proto-public/pbmesh/v1alpha1/http_route.proto new file mode 100644 index 000000000000..ea14176b1b7c --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route.proto @@ -0,0 +1,259 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.mesh.v1alpha1; + +import "pbmesh/v1alpha1/common.proto"; +import "pbmesh/v1alpha1/http_route_retries.proto"; +import "pbmesh/v1alpha1/http_route_timeouts.proto"; + +// NOTE: this should align to the GAMMA/gateway-api version, or at least be +// easily translatable. +// +// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.HTTPRoute +// +// This is a Resource type. +message HTTPRoute { + // ParentRefs references the resources (usually Gateways) that a Route wants + // to be attached to. Note that the referenced parent resource needs to allow + // this for the attachment to be complete. For Gateways, that means the + // Gateway needs to allow attachment from Routes of this kind and namespace. + // + // It is invalid to reference an identical parent more than once. It is valid + // to reference multiple distinct sections within the same parent resource, + // such as 2 Listeners within a Gateway. + repeated ParentReference parent_refs = 1; + + // Hostnames are the hostnames for which this HTTPRoute should respond to requests. + repeated string hostnames = 2; + + // Rules are a list of HTTP-based routing rules that this route should + // use for constructing a routing table. + repeated HTTPRouteRule rules = 3; +} + +// HTTPRouteRule specifies the routing rules used to determine what upstream +// service an HTTP request is routed to. +message HTTPRouteRule { + // Matches specified the matching criteria used in the routing table. If a + // request matches the given HTTPMatch configuration, then traffic is routed + // to services specified in the Services field. + repeated HTTPRouteMatch matches = 1; + + repeated HTTPRouteFilter filters = 2; + + // BackendRefs defines the backend(s) where matching requests should be sent. + // + // Failure behavior here depends on how many BackendRefs are specified and + // how many are invalid. + // + // If all entries in BackendRefs are invalid, and there are also no filters + // specified in this route rule, all traffic which matches this rule MUST + // receive a 500 status code. + // + // See the HTTPBackendRef definition for the rules about what makes a single + // HTTPBackendRef invalid. + // + // When a HTTPBackendRef is invalid, 500 status codes MUST be returned for + // requests that would have otherwise been routed to an invalid backend. If + // multiple backends are specified, and some are invalid, the proportion of + // requests that would otherwise have been routed to an invalid backend MUST + // receive a 500 status code. + // + // For example, if two backends are specified with equal weights, and one is + // invalid, 50 percent of traffic must receive a 500. Implementations may + // choose how that 50 percent is determined. + repeated HTTPBackendRef backend_refs = 3; + + // ALTERNATIVE: Timeouts defines the timeouts that can be configured for an HTTP request. + HTTPRouteTimeouts timeouts = 4; + // ALTERNATIVE: + HTTPRouteRetries retries = 5; +} + +message HTTPRouteMatch { + // Path specifies a HTTP request path matcher. If this field is not + // specified, a default prefix match on the “/” path is provided. + HTTPPathMatch path = 1; + + // Headers specifies HTTP request header matchers. Multiple match values are + // ANDed together, meaning, a request must match all the specified headers to + // select the route. + repeated HTTPHeaderMatch headers = 2; + + // QueryParams specifies HTTP query parameter matchers. Multiple match values + // are ANDed together, meaning, a request must match all the specified query + // parameters to select the route. + repeated HTTPQueryParamMatch query_params = 3; + + // Method specifies HTTP method matcher. When specified, this route will be + // matched only if the request has the specified method. + string method = 4; +} + +message HTTPPathMatch { + // Type specifies how to match against the path Value. + PathMatchType type = 1; + // Value of the HTTP path to match against. + string value = 2; +} + +// PathMatchType specifies the semantics of how HTTP paths should be compared. +// Valid PathMatchType values, along with their support levels, are: +// +// PathPrefix and Exact paths must be syntactically valid: +// +// - Must begin with the / character +// - Must not contain consecutive / characters (e.g. /foo///, //). +// - Note that values may be added to this enum, implementations must ensure that unknown values will not cause a crash. +// +// Unknown values here must result in the implementation setting the Accepted +// Condition for the Route to status: False, with a Reason of UnsupportedValue. +enum PathMatchType { + PATH_MATCH_TYPE_UNSPECIFIED = 0; + PATH_MATCH_TYPE_EXACT = 1; + PATH_MATCH_TYPE_PREFIX = 2; + PATH_MATCH_TYPE_REGEX = 3; +} + +message HTTPHeaderMatch { + // Type specifies how to match against the value of the header. + HeaderMatchType type = 1; + + // Name is the name of the HTTP Header to be matched. Name matching MUST be + // case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). + // + // If multiple entries specify equivalent header names, only the first entry + // with an equivalent name MUST be considered for a match. Subsequent entries + // with an equivalent header name MUST be ignored. Due to the + // case-insensitivity of header names, “foo” and “Foo” are considered + // equivalent. + // + // When a header is repeated in an HTTP request, it is + // implementation-specific behavior as to how this is represented. Generally, + // proxies should follow the guidance from the RFC: + // https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 regarding + // processing a repeated header, with special handling for “Set-Cookie”. + string name = 2; + + // Value is the value of HTTP Header to be matched. + string value = 3; + + // NOTE: not in gamma; service-router compat + bool invert = 4; +} + +// HeaderMatchType specifies the semantics of how HTTP header values should be +// compared. Valid HeaderMatchType values, along with their conformance levels, +// are: +// +// Note that values may be added to this enum, implementations must ensure that +// unknown values will not cause a crash. +// +// Unknown values here must result in the implementation setting the Accepted +// Condition for the Route to status: False, with a Reason of UnsupportedValue. +enum HeaderMatchType { + HEADER_MATCH_TYPE_UNSPECIFIED = 0; + HEADER_MATCH_TYPE_EXACT = 1; + HEADER_MATCH_TYPE_REGEX = 2; + // consul only after this point (service-router compat) + HEADER_MATCH_TYPE_PRESENT = 3; + HEADER_MATCH_TYPE_PREFIX = 4; + HEADER_MATCH_TYPE_SUFFIX = 5; +} + +message HTTPQueryParamMatch { + // Type specifies how to match against the value of the query parameter. + QueryParamMatchType type = 1; + + // Name is the name of the HTTP query param to be matched. This must be an + // exact string match. (See + // https://tools.ietf.org/html/rfc7230#section-2.7.3). + // + // If multiple entries specify equivalent query param names, only the first + // entry with an equivalent name MUST be considered for a match. Subsequent + // entries with an equivalent query param name MUST be ignored. + // + // If a query param is repeated in an HTTP request, the behavior is purposely + // left undefined, since different data planes have different capabilities. + // However, it is recommended that implementations should match against the + // first value of the param if the data plane supports it, as this behavior + // is expected in other load balancing contexts outside of the Gateway API. + // + // Users SHOULD NOT route traffic based on repeated query params to guard + // themselves against potential differences in the implementations. + string name = 2; + + // Value is the value of HTTP query param to be matched. + string value = 3; +} + +enum QueryParamMatchType { + QUERY_PARAM_MATCH_TYPE_UNSPECIFIED = 0; + QUERY_PARAM_MATCH_TYPE_EXACT = 1; + QUERY_PARAM_MATCH_TYPE_REGEX = 2; + // consul only after this point (service-router compat) + QUERY_PARAM_MATCH_TYPE_PRESENT = 3; +} + +message HTTPRouteFilter { + // RequestHeaderModifier defines a schema for a filter that modifies request + // headers. + HTTPHeaderFilter request_header_modifier = 1; + + // ResponseHeaderModifier defines a schema for a filter that modifies + // response headers. + HTTPHeaderFilter response_header_modifier = 2; + + // URLRewrite defines a schema for a filter that modifies a request during + // forwarding. + HTTPURLRewriteFilter url_rewrite = 5; +} + +message HTTPHeaderFilter { + // Set overwrites the request with the given header (name, value) before the + // action. + repeated HTTPHeader set = 1; + + // Add adds the given header(s) (name, value) to the request before the + // action. It appends to any existing values associated with the header name. + repeated HTTPHeader add = 2; + + // Remove the given header(s) from the HTTP request before the action. The + // value of Remove is a list of HTTP header names. Note that the header names + // are case-insensitive (see + // https://datatracker.ietf.org/doc/html/rfc2616#section-4.2). + repeated string remove = 3; +} + +message HTTPHeader { + string name = 1; + string value = 2; +} + +message HTTPURLRewriteFilter { + string path_prefix = 1; +} + +message HTTPBackendRef { + BackendReference backend_ref = 1; + + // Weight specifies the proportion of requests forwarded to the referenced + // backend. This is computed as weight/(sum of all weights in this + // BackendRefs list). For non-zero values, there may be some epsilon from the + // exact proportion defined here depending on the precision an implementation + // supports. Weight is not a percentage and the sum of weights does not need + // to equal 100. + // + //If only one backend is specified and it has a weight greater than 0, 100% + //of the traffic is forwarded to that backend. If weight is set to 0, no + //traffic should be forwarded for this entry. If unspecified, weight defaults + //to 1. + uint32 weight = 2; + + // Filters defined at this level should be executed if and only if the + // request is being forwarded to the backend defined here. + repeated HTTPRouteFilter filters = 3; +} diff --git a/proto-public/pbmesh/v1alpha1/http_route_retries.pb.binary.go b/proto-public/pbmesh/v1alpha1/http_route_retries.pb.binary.go new file mode 100644 index 000000000000..b84704f0e1aa --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route_retries.pb.binary.go @@ -0,0 +1,18 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbmesh/v1alpha1/http_route_retries.proto + +package meshv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPRouteRetries) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPRouteRetries) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/http_route_retries.pb.go b/proto-public/pbmesh/v1alpha1/http_route_retries.pb.go new file mode 100644 index 000000000000..5a34d26a3260 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route_retries.pb.go @@ -0,0 +1,206 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/http_route_retries.proto + +package meshv1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ALTERNATIVE: not using policy attachment semantics +type HTTPRouteRetries struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // NumRetries is the number of times to retry the request when a retryable + // result occurs. + Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` + // RetryOnConnectFailure allows for connection failure errors to trigger a + // retry. + OnConnectFailure bool `protobuf:"varint,2,opt,name=on_connect_failure,json=onConnectFailure,proto3" json:"on_connect_failure,omitempty"` + // RetryOn allows setting envoy specific conditions when a request should + // be automatically retried. + OnConditions []string `protobuf:"bytes,3,rep,name=on_conditions,json=onConditions,proto3" json:"on_conditions,omitempty"` + // RetryOnStatusCodes is a flat list of http response status codes that are + // eligible for retry. This again should be feasible in any reasonable proxy. + OnStatusCodes []uint32 `protobuf:"varint,4,rep,packed,name=on_status_codes,json=onStatusCodes,proto3" json:"on_status_codes,omitempty"` +} + +func (x *HTTPRouteRetries) Reset() { + *x = HTTPRouteRetries{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPRouteRetries) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPRouteRetries) ProtoMessage() {} + +func (x *HTTPRouteRetries) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPRouteRetries.ProtoReflect.Descriptor instead. +func (*HTTPRouteRetries) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_retries_proto_rawDescGZIP(), []int{0} +} + +func (x *HTTPRouteRetries) GetNumber() int32 { + if x != nil { + return x.Number + } + return 0 +} + +func (x *HTTPRouteRetries) GetOnConnectFailure() bool { + if x != nil { + return x.OnConnectFailure + } + return false +} + +func (x *HTTPRouteRetries) GetOnConditions() []string { + if x != nil { + return x.OnConditions + } + return nil +} + +func (x *HTTPRouteRetries) GetOnStatusCodes() []uint32 { + if x != nil { + return x.OnStatusCodes + } + return nil +} + +var File_pbmesh_v1alpha1_http_route_retries_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_http_route_retries_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, + 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0xa5, 0x01, 0x0a, 0x10, 0x48, + 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5f, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x61, + 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x6e, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0d, 0x52, 0x0d, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, + 0x65, 0x73, 0x42, 0x9d, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x15, 0x48, 0x74, 0x74, 0x70, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, + 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, + 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, + 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_http_route_retries_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_http_route_retries_proto_rawDescData = file_pbmesh_v1alpha1_http_route_retries_proto_rawDesc +) + +func file_pbmesh_v1alpha1_http_route_retries_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_http_route_retries_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_http_route_retries_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_http_route_retries_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_http_route_retries_proto_rawDescData +} + +var file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_pbmesh_v1alpha1_http_route_retries_proto_goTypes = []interface{}{ + (*HTTPRouteRetries)(nil), // 0: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries +} +var file_pbmesh_v1alpha1_http_route_retries_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_http_route_retries_proto_init() } +func file_pbmesh_v1alpha1_http_route_retries_proto_init() { + if File_pbmesh_v1alpha1_http_route_retries_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPRouteRetries); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_http_route_retries_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_http_route_retries_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_http_route_retries_proto_depIdxs, + MessageInfos: file_pbmesh_v1alpha1_http_route_retries_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_http_route_retries_proto = out.File + file_pbmesh_v1alpha1_http_route_retries_proto_rawDesc = nil + file_pbmesh_v1alpha1_http_route_retries_proto_goTypes = nil + file_pbmesh_v1alpha1_http_route_retries_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/http_route_retries.proto b/proto-public/pbmesh/v1alpha1/http_route_retries.proto new file mode 100644 index 000000000000..3ea112027abe --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route_retries.proto @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.mesh.v1alpha1; + +// ALTERNATIVE: not using policy attachment semantics +message HTTPRouteRetries { + // NumRetries is the number of times to retry the request when a retryable + // result occurs. + int32 number = 1; + + // RetryOnConnectFailure allows for connection failure errors to trigger a + // retry. + bool on_connect_failure = 2; + + // RetryOn allows setting envoy specific conditions when a request should + // be automatically retried. + repeated string on_conditions = 3; + + // RetryOnStatusCodes is a flat list of http response status codes that are + // eligible for retry. This again should be feasible in any reasonable proxy. + repeated uint32 on_status_codes = 4; +} diff --git a/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.binary.go b/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.binary.go new file mode 100644 index 000000000000..cb38ff24c577 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.binary.go @@ -0,0 +1,18 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbmesh/v1alpha1/http_route_timeouts.proto + +package meshv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *HTTPRouteTimeouts) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *HTTPRouteTimeouts) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.go b/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.go new file mode 100644 index 000000000000..0fc421e43e5b --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route_timeouts.pb.go @@ -0,0 +1,223 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/http_route_timeouts.proto + +package meshv1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// HTTPRouteTimeouts defines timeouts that can be configured for an HTTPRoute. +// Timeout values are formatted like 1h/1m/1s/1ms as parsed by Golang time.ParseDuration +// and MUST BE >= 1ms. +// +// ALTERNATIVE: not using policy attachment semantics +type HTTPRouteTimeouts struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Request specifies the duration for processing an HTTP client request after which the + // gateway will time out if unable to send a response. + // Whether the gateway starts the timeout before or after the entire client request stream + // has been received, is implementation-dependent. + // + // For example, setting the `rules.timeouts.request` field to the value `10s` in an + // `HTTPRoute` will cause a timeout if a client request is taking longer than 10 seconds + // to complete. + // + // When this field is unspecified, request timeout behavior is implementation-dependent. + Request *durationpb.Duration `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + // BackendRequest specifies a timeout for an individual request from the gateway + // to a backend service. Typically used in conjuction with retry configuration, + // if supported by an implementation. + // + // The value of BackendRequest defaults to and must be <= the value of Request timeout. + // + // Support: Extended + // + // TODO(rb): net-new feature + BackendRequest *durationpb.Duration `protobuf:"bytes,2,opt,name=backend_request,json=backendRequest,proto3" json:"backend_request,omitempty"` + // TODO(RB): this is a consul-only feature + Idle *durationpb.Duration `protobuf:"bytes,3,opt,name=idle,proto3" json:"idle,omitempty"` +} + +func (x *HTTPRouteTimeouts) Reset() { + *x = HTTPRouteTimeouts{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *HTTPRouteTimeouts) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HTTPRouteTimeouts) ProtoMessage() {} + +func (x *HTTPRouteTimeouts) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HTTPRouteTimeouts.ProtoReflect.Descriptor instead. +func (*HTTPRouteTimeouts) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescGZIP(), []int{0} +} + +func (x *HTTPRouteTimeouts) GetRequest() *durationpb.Duration { + if x != nil { + return x.Request + } + return nil +} + +func (x *HTTPRouteTimeouts) GetBackendRequest() *durationpb.Duration { + if x != nil { + return x.BackendRequest + } + return nil +} + +func (x *HTTPRouteTimeouts) GetIdle() *durationpb.Duration { + if x != nil { + return x.Idle + } + return nil +} + +var File_pbmesh_v1alpha1_http_route_timeouts_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01, 0x0a, 0x11, + 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x73, 0x12, 0x33, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x62, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x69, 0x64, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x69, 0x64, 0x6c, 0x65, 0x42, 0x9e, 0x02, 0x0a, 0x22, 0x63, 0x6f, + 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x42, 0x16, 0x48, 0x74, 0x74, 0x70, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, + 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, + 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, + 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, + 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescData = file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDesc +) + +func file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDescData +} + +var file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_pbmesh_v1alpha1_http_route_timeouts_proto_goTypes = []interface{}{ + (*HTTPRouteTimeouts)(nil), // 0: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration +} +var file_pbmesh_v1alpha1_http_route_timeouts_proto_depIdxs = []int32{ + 1, // 0: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts.request:type_name -> google.protobuf.Duration + 1, // 1: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts.backend_request:type_name -> google.protobuf.Duration + 1, // 2: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts.idle:type_name -> google.protobuf.Duration + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_http_route_timeouts_proto_init() } +func file_pbmesh_v1alpha1_http_route_timeouts_proto_init() { + if File_pbmesh_v1alpha1_http_route_timeouts_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HTTPRouteTimeouts); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_http_route_timeouts_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_http_route_timeouts_proto_depIdxs, + MessageInfos: file_pbmesh_v1alpha1_http_route_timeouts_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_http_route_timeouts_proto = out.File + file_pbmesh_v1alpha1_http_route_timeouts_proto_rawDesc = nil + file_pbmesh_v1alpha1_http_route_timeouts_proto_goTypes = nil + file_pbmesh_v1alpha1_http_route_timeouts_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/http_route_timeouts.proto b/proto-public/pbmesh/v1alpha1/http_route_timeouts.proto new file mode 100644 index 000000000000..f33587496b55 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/http_route_timeouts.proto @@ -0,0 +1,41 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.mesh.v1alpha1; + +import "google/protobuf/duration.proto"; + +// HTTPRouteTimeouts defines timeouts that can be configured for an HTTPRoute. +// Timeout values are formatted like 1h/1m/1s/1ms as parsed by Golang time.ParseDuration +// and MUST BE >= 1ms. +// +// ALTERNATIVE: not using policy attachment semantics +message HTTPRouteTimeouts { + // Request specifies the duration for processing an HTTP client request after which the + // gateway will time out if unable to send a response. + // Whether the gateway starts the timeout before or after the entire client request stream + // has been received, is implementation-dependent. + // + // For example, setting the `rules.timeouts.request` field to the value `10s` in an + // `HTTPRoute` will cause a timeout if a client request is taking longer than 10 seconds + // to complete. + // + // When this field is unspecified, request timeout behavior is implementation-dependent. + google.protobuf.Duration request = 1; + + // BackendRequest specifies a timeout for an individual request from the gateway + // to a backend service. Typically used in conjuction with retry configuration, + // if supported by an implementation. + // + // The value of BackendRequest defaults to and must be <= the value of Request timeout. + // + // Support: Extended + // + // TODO(rb): net-new feature + google.protobuf.Duration backend_request = 2; + + // TODO(RB): this is a consul-only feature + google.protobuf.Duration idle = 3; +} diff --git a/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.binary.go b/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.binary.go index 5238331fb7f9..bb706d5da3d6 100644 --- a/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.binary.go +++ b/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.binary.go @@ -46,3 +46,23 @@ func (msg *BootstrapConfig) MarshalBinary() ([]byte, error) { func (msg *BootstrapConfig) UnmarshalBinary(b []byte) error { return proto.Unmarshal(b, msg) } + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *AccessLogsConfig) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *AccessLogsConfig) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *EnvoyExtension) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *EnvoyExtension) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.go b/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.go index 6ce928b15384..0072714553da 100644 --- a/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.go +++ b/proto-public/pbmesh/v1alpha1/proxy_configuration.pb.go @@ -82,6 +82,110 @@ func (ProxyMode) EnumDescriptor() ([]byte, []int) { return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{0} } +type LogSinkType int32 + +const ( + // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX + LogSinkType_LOG_SINK_TYPE_DEFAULT LogSinkType = 0 + LogSinkType_LOG_SINK_TYPE_FILE LogSinkType = 1 + LogSinkType_LOG_SINK_TYPE_STDERR LogSinkType = 2 + LogSinkType_LOG_SINK_TYPE_STDOUT LogSinkType = 3 +) + +// Enum value maps for LogSinkType. +var ( + LogSinkType_name = map[int32]string{ + 0: "LOG_SINK_TYPE_DEFAULT", + 1: "LOG_SINK_TYPE_FILE", + 2: "LOG_SINK_TYPE_STDERR", + 3: "LOG_SINK_TYPE_STDOUT", + } + LogSinkType_value = map[string]int32{ + "LOG_SINK_TYPE_DEFAULT": 0, + "LOG_SINK_TYPE_FILE": 1, + "LOG_SINK_TYPE_STDERR": 2, + "LOG_SINK_TYPE_STDOUT": 3, + } +) + +func (x LogSinkType) Enum() *LogSinkType { + p := new(LogSinkType) + *p = x + return p +} + +func (x LogSinkType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LogSinkType) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[1].Descriptor() +} + +func (LogSinkType) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[1] +} + +func (x LogSinkType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LogSinkType.Descriptor instead. +func (LogSinkType) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{1} +} + +type MutualTLSMode int32 + +const ( + // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX + MutualTLSMode_MUTUAL_TLS_MODE_DEFAULT MutualTLSMode = 0 + MutualTLSMode_MUTUAL_TLS_MODE_STRICT MutualTLSMode = 1 + MutualTLSMode_MUTUAL_TLS_MODE_PERMISSIVE MutualTLSMode = 2 +) + +// Enum value maps for MutualTLSMode. +var ( + MutualTLSMode_name = map[int32]string{ + 0: "MUTUAL_TLS_MODE_DEFAULT", + 1: "MUTUAL_TLS_MODE_STRICT", + 2: "MUTUAL_TLS_MODE_PERMISSIVE", + } + MutualTLSMode_value = map[string]int32{ + "MUTUAL_TLS_MODE_DEFAULT": 0, + "MUTUAL_TLS_MODE_STRICT": 1, + "MUTUAL_TLS_MODE_PERMISSIVE": 2, + } +) + +func (x MutualTLSMode) Enum() *MutualTLSMode { + p := new(MutualTLSMode) + *p = x + return p +} + +func (x MutualTLSMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MutualTLSMode) Descriptor() protoreflect.EnumDescriptor { + return file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[2].Descriptor() +} + +func (MutualTLSMode) Type() protoreflect.EnumType { + return &file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes[2] +} + +func (x MutualTLSMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MutualTLSMode.Descriptor instead. +func (MutualTLSMode) EnumDescriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{2} +} + +// This is a Resource type. type ProxyConfiguration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -172,27 +276,31 @@ type DynamicConfig struct { // mode indicates the proxy's mode. This will default to 'transparent'. Mode ProxyMode `protobuf:"varint,1,opt,name=mode,proto3,enum=hashicorp.consul.mesh.v1alpha1.ProxyMode" json:"mode,omitempty"` TransparentProxy *TransparentProxy `protobuf:"bytes,2,opt,name=transparent_proxy,json=transparentProxy,proto3" json:"transparent_proxy,omitempty"` + MutualTlsMode MutualTLSMode `protobuf:"varint,3,opt,name=mutual_tls_mode,json=mutualTlsMode,proto3,enum=hashicorp.consul.mesh.v1alpha1.MutualTLSMode" json:"mutual_tls_mode,omitempty"` // local_connection is the configuration that should be used // to connect to the local application provided per-port. // The map keys should correspond to port names on the workload. - LocalConnection map[string]*ConnectionConfig `protobuf:"bytes,3,rep,name=local_connection,json=localConnection,proto3" json:"local_connection,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + LocalConnection map[string]*ConnectionConfig `protobuf:"bytes,4,rep,name=local_connection,json=localConnection,proto3" json:"local_connection,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // inbound_connections configures inbound connections to the proxy. - InboundConnections *InboundConnectionsConfig `protobuf:"bytes,4,opt,name=inbound_connections,json=inboundConnections,proto3" json:"inbound_connections,omitempty"` - MeshGatewayMode MeshGatewayMode `protobuf:"varint,5,opt,name=mesh_gateway_mode,json=meshGatewayMode,proto3,enum=hashicorp.consul.mesh.v1alpha1.MeshGatewayMode" json:"mesh_gateway_mode,omitempty"` - ExposeConfig *ExposeConfig `protobuf:"bytes,6,opt,name=expose_config,json=exposeConfig,proto3" json:"expose_config,omitempty"` - PublicListenerJson string `protobuf:"bytes,7,opt,name=public_listener_json,json=publicListenerJson,proto3" json:"public_listener_json,omitempty"` - ListenerTracingJson string `protobuf:"bytes,8,opt,name=listener_tracing_json,json=listenerTracingJson,proto3" json:"listener_tracing_json,omitempty"` - LocalClusterJson string `protobuf:"bytes,9,opt,name=local_cluster_json,json=localClusterJson,proto3" json:"local_cluster_json,omitempty"` + InboundConnections *InboundConnectionsConfig `protobuf:"bytes,5,opt,name=inbound_connections,json=inboundConnections,proto3" json:"inbound_connections,omitempty"` + MeshGatewayMode MeshGatewayMode `protobuf:"varint,6,opt,name=mesh_gateway_mode,json=meshGatewayMode,proto3,enum=hashicorp.consul.mesh.v1alpha1.MeshGatewayMode" json:"mesh_gateway_mode,omitempty"` + ExposeConfig *ExposeConfig `protobuf:"bytes,7,opt,name=expose_config,json=exposeConfig,proto3" json:"expose_config,omitempty"` + // AccessLogs configures the output and format of Envoy access logs + AccessLogs *AccessLogsConfig `protobuf:"bytes,8,opt,name=access_logs,json=accessLogs,proto3" json:"access_logs,omitempty"` + EnvoyExtensions []*EnvoyExtension `protobuf:"bytes,9,rep,name=envoy_extensions,json=envoyExtensions,proto3" json:"envoy_extensions,omitempty"` + PublicListenerJson string `protobuf:"bytes,10,opt,name=public_listener_json,json=publicListenerJson,proto3" json:"public_listener_json,omitempty"` + ListenerTracingJson string `protobuf:"bytes,11,opt,name=listener_tracing_json,json=listenerTracingJson,proto3" json:"listener_tracing_json,omitempty"` + LocalClusterJson string `protobuf:"bytes,12,opt,name=local_cluster_json,json=localClusterJson,proto3" json:"local_cluster_json,omitempty"` // deprecated: // local_workload_address, local_workload_port, and local_workload_socket_path // are deprecated and are only needed for migration of existing resources. // // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. - LocalWorkloadAddress string `protobuf:"bytes,10,opt,name=local_workload_address,json=localWorkloadAddress,proto3" json:"local_workload_address,omitempty"` + LocalWorkloadAddress string `protobuf:"bytes,13,opt,name=local_workload_address,json=localWorkloadAddress,proto3" json:"local_workload_address,omitempty"` // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. - LocalWorkloadPort uint32 `protobuf:"varint,11,opt,name=local_workload_port,json=localWorkloadPort,proto3" json:"local_workload_port,omitempty"` + LocalWorkloadPort uint32 `protobuf:"varint,14,opt,name=local_workload_port,json=localWorkloadPort,proto3" json:"local_workload_port,omitempty"` // Deprecated: Marked as deprecated in pbmesh/v1alpha1/proxy_configuration.proto. - LocalWorkloadSocketPath string `protobuf:"bytes,12,opt,name=local_workload_socket_path,json=localWorkloadSocketPath,proto3" json:"local_workload_socket_path,omitempty"` + LocalWorkloadSocketPath string `protobuf:"bytes,15,opt,name=local_workload_socket_path,json=localWorkloadSocketPath,proto3" json:"local_workload_socket_path,omitempty"` } func (x *DynamicConfig) Reset() { @@ -241,6 +349,13 @@ func (x *DynamicConfig) GetTransparentProxy() *TransparentProxy { return nil } +func (x *DynamicConfig) GetMutualTlsMode() MutualTLSMode { + if x != nil { + return x.MutualTlsMode + } + return MutualTLSMode_MUTUAL_TLS_MODE_DEFAULT +} + func (x *DynamicConfig) GetLocalConnection() map[string]*ConnectionConfig { if x != nil { return x.LocalConnection @@ -269,6 +384,20 @@ func (x *DynamicConfig) GetExposeConfig() *ExposeConfig { return nil } +func (x *DynamicConfig) GetAccessLogs() *AccessLogsConfig { + if x != nil { + return x.AccessLogs + } + return nil +} + +func (x *DynamicConfig) GetEnvoyExtensions() []*EnvoyExtension { + if x != nil { + return x.EnvoyExtensions + } + return nil +} + func (x *DynamicConfig) GetPublicListenerJson() string { if x != nil { return x.PublicListenerJson @@ -518,6 +647,182 @@ func (x *BootstrapConfig) GetTracingConfigJson() string { return "" } +// AccessLogsConfig contains the associated default settings for all Envoy +// instances within the datacenter or partition +type AccessLogsConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Enabled turns off all access logging + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // DisableListenerLogs turns off just listener logs for connections rejected by Envoy because they don't + // have a matching listener filter. + DisableListenerLogs bool `protobuf:"varint,2,opt,name=disable_listener_logs,json=disableListenerLogs,proto3" json:"disable_listener_logs,omitempty"` + // Type selects the output for logs: "file", "stderr". "stdout" + Type LogSinkType `protobuf:"varint,3,opt,name=type,proto3,enum=hashicorp.consul.mesh.v1alpha1.LogSinkType" json:"type,omitempty"` + // Path is the output file to write logs + Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"` + // The presence of one format string or the other implies the access log string encoding. + // Defining Both is invalid. + JsonFormat string `protobuf:"bytes,5,opt,name=json_format,json=jsonFormat,proto3" json:"json_format,omitempty"` + TextFormat string `protobuf:"bytes,6,opt,name=text_format,json=textFormat,proto3" json:"text_format,omitempty"` +} + +func (x *AccessLogsConfig) Reset() { + *x = AccessLogsConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccessLogsConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccessLogsConfig) ProtoMessage() {} + +func (x *AccessLogsConfig) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AccessLogsConfig.ProtoReflect.Descriptor instead. +func (*AccessLogsConfig) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{4} +} + +func (x *AccessLogsConfig) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *AccessLogsConfig) GetDisableListenerLogs() bool { + if x != nil { + return x.DisableListenerLogs + } + return false +} + +func (x *AccessLogsConfig) GetType() LogSinkType { + if x != nil { + return x.Type + } + return LogSinkType_LOG_SINK_TYPE_DEFAULT +} + +func (x *AccessLogsConfig) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *AccessLogsConfig) GetJsonFormat() string { + if x != nil { + return x.JsonFormat + } + return "" +} + +func (x *AccessLogsConfig) GetTextFormat() string { + if x != nil { + return x.TextFormat + } + return "" +} + +// EnvoyExtension has configuration for an extension that patches Envoy resources. +type EnvoyExtension struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` + Arguments *structpb.Struct `protobuf:"bytes,3,opt,name=arguments,proto3" json:"arguments,omitempty"` + ConsulVersion string `protobuf:"bytes,4,opt,name=consul_version,json=consulVersion,proto3" json:"consul_version,omitempty"` + EnvoyVersion string `protobuf:"bytes,5,opt,name=envoy_version,json=envoyVersion,proto3" json:"envoy_version,omitempty"` +} + +func (x *EnvoyExtension) Reset() { + *x = EnvoyExtension{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnvoyExtension) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnvoyExtension) ProtoMessage() {} + +func (x *EnvoyExtension) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnvoyExtension.ProtoReflect.Descriptor instead. +func (*EnvoyExtension) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP(), []int{5} +} + +func (x *EnvoyExtension) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *EnvoyExtension) GetRequired() bool { + if x != nil { + return x.Required + } + return false +} + +func (x *EnvoyExtension) GetArguments() *structpb.Struct { + if x != nil { + return x.Arguments + } + return nil +} + +func (x *EnvoyExtension) GetConsulVersion() string { + if x != nil { + return x.ConsulVersion + } + return "" +} + +func (x *EnvoyExtension) GetEnvoyVersion() string { + if x != nil { + return x.EnvoyVersion + } + return "" +} + var File_pbmesh_v1alpha1_proxy_configuration_proto protoreflect.FileDescriptor var file_pbmesh_v1alpha1_proxy_configuration_proto_rawDesc = []byte{ @@ -557,7 +862,7 @@ var file_pbmesh_v1alpha1_proxy_configuration_proto_rawDesc = []byte{ 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0c, 0x6f, 0x70, 0x61, - 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xf0, 0x07, 0x0a, 0x0d, 0x44, 0x79, + 0x71, 0x75, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xf5, 0x09, 0x0a, 0x0d, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, @@ -568,127 +873,185 @@ var file_pbmesh_v1alpha1_proxy_configuration_proto_rawDesc = []byte{ 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x6d, 0x0a, 0x10, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x69, 0x0a, 0x13, 0x69, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x55, 0x0a, 0x0f, 0x6d, 0x75, 0x74, + 0x75, 0x61, 0x6c, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x4c, 0x53, 0x4d, 0x6f, 0x64, + 0x65, 0x52, 0x0d, 0x6d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, 0x6c, 0x73, 0x4d, 0x6f, 0x64, 0x65, + 0x12, 0x6d, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x79, 0x6e, 0x61, + 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x69, 0x0a, 0x13, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x68, + 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, + 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x11, 0x6d, 0x65, + 0x73, 0x68, 0x5f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x12, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x5b, 0x0a, 0x11, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, + 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, + 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x4d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x52, - 0x0f, 0x6d, 0x65, 0x73, 0x68, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x4d, 0x6f, 0x64, 0x65, - 0x12, 0x51, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, - 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x54, 0x72, - 0x61, 0x63, 0x69, 0x6e, 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x14, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x32, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x02, - 0x18, 0x01, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, - 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, - 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x17, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x74, 0x0a, 0x14, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x45, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x65, 0x78, + 0x70, 0x6f, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x0b, 0x61, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x71, 0x0a, 0x10, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x12, 0x34, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x14, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x64, - 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0e, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x22, - 0xc0, 0x04, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x5f, 0x75, 0x72, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x55, - 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x67, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x5f, - 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x6f, 0x67, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x73, - 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x54, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, - 0x68, 0x65, 0x75, 0x73, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, - 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, - 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x79, - 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x76, 0x65, 0x72, - 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x70, 0x6c, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4a, 0x73, 0x6f, - 0x6e, 0x54, 0x70, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x53, 0x69, 0x6e, 0x6b, 0x73, - 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x73, 0x6f, 0x6e, - 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x73, - 0x6f, 0x6e, 0x2a, 0x56, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x6f, 0x64, 0x65, 0x12, - 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x45, - 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x58, 0x59, - 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x50, 0x41, 0x52, 0x45, 0x4e, - 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4d, 0x4f, 0x44, - 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x02, 0x42, 0x9f, 0x02, 0x0a, 0x22, 0x63, - 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x42, 0x17, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, - 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, - 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, - 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, - 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, - 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, - 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, - 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, - 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, - 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x59, 0x0a, + 0x10, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x6a, + 0x73, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x2c, + 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x16, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, + 0x52, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x32, 0x0a, 0x13, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, + 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x0d, 0x42, 0x02, 0x18, 0x01, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, + 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x3f, 0x0a, 0x1a, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, + 0x18, 0x01, 0x52, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x1a, 0x74, 0x0a, 0x14, 0x4c, + 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x71, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x64, + 0x69, 0x61, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x61, 0x6c, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, + 0x63, 0x74, 0x6c, 0x79, 0x22, 0xc0, 0x04, 0x0a, 0x0f, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, + 0x61, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x73, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x6f, 0x67, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, + 0x64, 0x6f, 0x67, 0x73, 0x74, 0x61, 0x74, 0x73, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x73, 0x54, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x70, + 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x6d, 0x65, + 0x74, 0x68, 0x65, 0x75, 0x73, 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, + 0x0f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x42, 0x69, 0x6e, + 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x5f, 0x62, + 0x69, 0x6e, 0x64, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x72, 0x65, 0x61, 0x64, 0x79, 0x42, 0x69, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x72, 0x12, 0x2a, 0x0a, + 0x11, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, + 0x70, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x70, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x5f, 0x6a, 0x73, 0x6f, + 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x5f, + 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, + 0x28, 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x6a, + 0x73, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x53, 0x69, 0x6e, 0x6b, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x66, + 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x74, 0x61, 0x74, 0x73, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x4a, 0x73, 0x6f, 0x6e, 0x22, 0xf7, 0x01, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, + 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x3f, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x69, 0x6e, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, + 0x1f, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x0e, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, + 0x52, 0x09, 0x61, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2a, 0x56, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4d, 0x4f, + 0x44, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, + 0x50, 0x52, 0x4f, 0x58, 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, + 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x4f, 0x58, + 0x59, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x02, 0x2a, + 0x74, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x53, 0x69, 0x6e, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, + 0x0a, 0x15, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x4f, 0x47, + 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, + 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4c, 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, 0x45, 0x52, 0x52, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x4c, + 0x4f, 0x47, 0x5f, 0x53, 0x49, 0x4e, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x44, + 0x4f, 0x55, 0x54, 0x10, 0x03, 0x2a, 0x68, 0x0a, 0x0d, 0x4d, 0x75, 0x74, 0x75, 0x61, 0x6c, 0x54, + 0x4c, 0x53, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x55, 0x54, 0x55, 0x41, 0x4c, + 0x5f, 0x54, 0x4c, 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, + 0x54, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x4d, 0x55, 0x54, 0x55, 0x41, 0x4c, 0x5f, 0x54, 0x4c, + 0x53, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x10, 0x01, 0x12, + 0x1e, 0x0a, 0x1a, 0x4d, 0x55, 0x54, 0x55, 0x41, 0x4c, 0x5f, 0x54, 0x4c, 0x53, 0x5f, 0x4d, 0x4f, + 0x44, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x56, 0x45, 0x10, 0x02, 0x42, + 0x9f, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x17, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, + 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, + 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, + 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, + 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, + 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, + 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -703,39 +1066,48 @@ func file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescGZIP() []byte { return file_pbmesh_v1alpha1_proxy_configuration_proto_rawDescData } -var file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_pbmesh_v1alpha1_proxy_configuration_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_pbmesh_v1alpha1_proxy_configuration_proto_goTypes = []interface{}{ (ProxyMode)(0), // 0: hashicorp.consul.mesh.v1alpha1.ProxyMode - (*ProxyConfiguration)(nil), // 1: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration - (*DynamicConfig)(nil), // 2: hashicorp.consul.mesh.v1alpha1.DynamicConfig - (*TransparentProxy)(nil), // 3: hashicorp.consul.mesh.v1alpha1.TransparentProxy - (*BootstrapConfig)(nil), // 4: hashicorp.consul.mesh.v1alpha1.BootstrapConfig - nil, // 5: hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry - (*v1alpha1.WorkloadSelector)(nil), // 6: hashicorp.consul.catalog.v1alpha1.WorkloadSelector - (*structpb.Struct)(nil), // 7: google.protobuf.Struct - (*InboundConnectionsConfig)(nil), // 8: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig - (MeshGatewayMode)(0), // 9: hashicorp.consul.mesh.v1alpha1.MeshGatewayMode - (*ExposeConfig)(nil), // 10: hashicorp.consul.mesh.v1alpha1.ExposeConfig - (*ConnectionConfig)(nil), // 11: hashicorp.consul.mesh.v1alpha1.ConnectionConfig + (LogSinkType)(0), // 1: hashicorp.consul.mesh.v1alpha1.LogSinkType + (MutualTLSMode)(0), // 2: hashicorp.consul.mesh.v1alpha1.MutualTLSMode + (*ProxyConfiguration)(nil), // 3: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration + (*DynamicConfig)(nil), // 4: hashicorp.consul.mesh.v1alpha1.DynamicConfig + (*TransparentProxy)(nil), // 5: hashicorp.consul.mesh.v1alpha1.TransparentProxy + (*BootstrapConfig)(nil), // 6: hashicorp.consul.mesh.v1alpha1.BootstrapConfig + (*AccessLogsConfig)(nil), // 7: hashicorp.consul.mesh.v1alpha1.AccessLogsConfig + (*EnvoyExtension)(nil), // 8: hashicorp.consul.mesh.v1alpha1.EnvoyExtension + nil, // 9: hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry + (*v1alpha1.WorkloadSelector)(nil), // 10: hashicorp.consul.catalog.v1alpha1.WorkloadSelector + (*structpb.Struct)(nil), // 11: google.protobuf.Struct + (*InboundConnectionsConfig)(nil), // 12: hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig + (MeshGatewayMode)(0), // 13: hashicorp.consul.mesh.v1alpha1.MeshGatewayMode + (*ExposeConfig)(nil), // 14: hashicorp.consul.mesh.v1alpha1.ExposeConfig + (*ConnectionConfig)(nil), // 15: hashicorp.consul.mesh.v1alpha1.ConnectionConfig } var file_pbmesh_v1alpha1_proxy_configuration_proto_depIdxs = []int32{ - 6, // 0: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.workloads:type_name -> hashicorp.consul.catalog.v1alpha1.WorkloadSelector - 2, // 1: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.dynamic_config:type_name -> hashicorp.consul.mesh.v1alpha1.DynamicConfig - 4, // 2: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.bootstrap_config:type_name -> hashicorp.consul.mesh.v1alpha1.BootstrapConfig - 7, // 3: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.opaque_config:type_name -> google.protobuf.Struct + 10, // 0: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.workloads:type_name -> hashicorp.consul.catalog.v1alpha1.WorkloadSelector + 4, // 1: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.dynamic_config:type_name -> hashicorp.consul.mesh.v1alpha1.DynamicConfig + 6, // 2: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.bootstrap_config:type_name -> hashicorp.consul.mesh.v1alpha1.BootstrapConfig + 11, // 3: hashicorp.consul.mesh.v1alpha1.ProxyConfiguration.opaque_config:type_name -> google.protobuf.Struct 0, // 4: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mode:type_name -> hashicorp.consul.mesh.v1alpha1.ProxyMode - 3, // 5: hashicorp.consul.mesh.v1alpha1.DynamicConfig.transparent_proxy:type_name -> hashicorp.consul.mesh.v1alpha1.TransparentProxy - 5, // 6: hashicorp.consul.mesh.v1alpha1.DynamicConfig.local_connection:type_name -> hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry - 8, // 7: hashicorp.consul.mesh.v1alpha1.DynamicConfig.inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig - 9, // 8: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mesh_gateway_mode:type_name -> hashicorp.consul.mesh.v1alpha1.MeshGatewayMode - 10, // 9: hashicorp.consul.mesh.v1alpha1.DynamicConfig.expose_config:type_name -> hashicorp.consul.mesh.v1alpha1.ExposeConfig - 11, // 10: hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.ConnectionConfig - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 5, // 5: hashicorp.consul.mesh.v1alpha1.DynamicConfig.transparent_proxy:type_name -> hashicorp.consul.mesh.v1alpha1.TransparentProxy + 2, // 6: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mutual_tls_mode:type_name -> hashicorp.consul.mesh.v1alpha1.MutualTLSMode + 9, // 7: hashicorp.consul.mesh.v1alpha1.DynamicConfig.local_connection:type_name -> hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry + 12, // 8: hashicorp.consul.mesh.v1alpha1.DynamicConfig.inbound_connections:type_name -> hashicorp.consul.mesh.v1alpha1.InboundConnectionsConfig + 13, // 9: hashicorp.consul.mesh.v1alpha1.DynamicConfig.mesh_gateway_mode:type_name -> hashicorp.consul.mesh.v1alpha1.MeshGatewayMode + 14, // 10: hashicorp.consul.mesh.v1alpha1.DynamicConfig.expose_config:type_name -> hashicorp.consul.mesh.v1alpha1.ExposeConfig + 7, // 11: hashicorp.consul.mesh.v1alpha1.DynamicConfig.access_logs:type_name -> hashicorp.consul.mesh.v1alpha1.AccessLogsConfig + 8, // 12: hashicorp.consul.mesh.v1alpha1.DynamicConfig.envoy_extensions:type_name -> hashicorp.consul.mesh.v1alpha1.EnvoyExtension + 1, // 13: hashicorp.consul.mesh.v1alpha1.AccessLogsConfig.type:type_name -> hashicorp.consul.mesh.v1alpha1.LogSinkType + 11, // 14: hashicorp.consul.mesh.v1alpha1.EnvoyExtension.arguments:type_name -> google.protobuf.Struct + 15, // 15: hashicorp.consul.mesh.v1alpha1.DynamicConfig.LocalConnectionEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.ConnectionConfig + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_pbmesh_v1alpha1_proxy_configuration_proto_init() } @@ -795,14 +1167,38 @@ func file_pbmesh_v1alpha1_proxy_configuration_proto_init() { return nil } } + file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccessLogsConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_proxy_configuration_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnvoyExtension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pbmesh_v1alpha1_proxy_configuration_proto_rawDesc, - NumEnums: 1, - NumMessages: 5, + NumEnums: 3, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/proto-public/pbmesh/v1alpha1/proxy_configuration.proto b/proto-public/pbmesh/v1alpha1/proxy_configuration.proto index 06ebecbf4aba..c20ff3d47c44 100644 --- a/proto-public/pbmesh/v1alpha1/proxy_configuration.proto +++ b/proto-public/pbmesh/v1alpha1/proxy_configuration.proto @@ -11,6 +11,7 @@ import "pbmesh/v1alpha1/connection.proto"; import "pbmesh/v1alpha1/expose.proto"; import "pbmesh/v1alpha1/routing.proto"; +// This is a Resource type. message ProxyConfiguration { // Selection of workloads this proxy configuration should apply to. // These can be prefixes or specific workload names. @@ -35,28 +36,35 @@ message DynamicConfig { TransparentProxy transparent_proxy = 2; + MutualTLSMode mutual_tls_mode = 3; + // local_connection is the configuration that should be used // to connect to the local application provided per-port. // The map keys should correspond to port names on the workload. - map local_connection = 3; + map local_connection = 4; // inbound_connections configures inbound connections to the proxy. - InboundConnectionsConfig inbound_connections = 4; + InboundConnectionsConfig inbound_connections = 5; + + MeshGatewayMode mesh_gateway_mode = 6; + + ExposeConfig expose_config = 7; - MeshGatewayMode mesh_gateway_mode = 5; + // AccessLogs configures the output and format of Envoy access logs + AccessLogsConfig access_logs = 8; - ExposeConfig expose_config = 6; + repeated EnvoyExtension envoy_extensions = 9; - string public_listener_json = 7; - string listener_tracing_json = 8; - string local_cluster_json = 9; + string public_listener_json = 10; + string listener_tracing_json = 11; + string local_cluster_json = 12; // deprecated: // local_workload_address, local_workload_port, and local_workload_socket_path // are deprecated and are only needed for migration of existing resources. - string local_workload_address = 10 [deprecated = true]; - uint32 local_workload_port = 11 [deprecated = true]; - string local_workload_socket_path = 12 [deprecated = true]; + string local_workload_address = 13 [deprecated = true]; + uint32 local_workload_port = 14 [deprecated = true]; + string local_workload_socket_path = 15 [deprecated = true]; } message TransparentProxy { @@ -102,3 +110,49 @@ enum ProxyMode { // by the local application and other proxies. PROXY_MODE_DIRECT = 2; } + +// AccessLogsConfig contains the associated default settings for all Envoy +// instances within the datacenter or partition +message AccessLogsConfig { + // Enabled turns off all access logging + bool enabled = 1; + + // DisableListenerLogs turns off just listener logs for connections rejected by Envoy because they don't + // have a matching listener filter. + bool disable_listener_logs = 2; + + // Type selects the output for logs: "file", "stderr". "stdout" + LogSinkType type = 3; + + // Path is the output file to write logs + string path = 4; + + // The presence of one format string or the other implies the access log string encoding. + // Defining Both is invalid. + string json_format = 5; + string text_format = 6; +} + +enum LogSinkType { + // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX + LOG_SINK_TYPE_DEFAULT = 0; + LOG_SINK_TYPE_FILE = 1; + LOG_SINK_TYPE_STDERR = 2; + LOG_SINK_TYPE_STDOUT = 3; +} + +// EnvoyExtension has configuration for an extension that patches Envoy resources. +message EnvoyExtension { + string name = 1; + bool required = 2; + google.protobuf.Struct arguments = 3; + string consul_version = 4; + string envoy_version = 5; +} + +enum MutualTLSMode { + // buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX + MUTUAL_TLS_MODE_DEFAULT = 0; + MUTUAL_TLS_MODE_STRICT = 1; + MUTUAL_TLS_MODE_PERMISSIVE = 2; +} diff --git a/proto-public/pbmesh/v1alpha1/tcp_route.pb.binary.go b/proto-public/pbmesh/v1alpha1/tcp_route.pb.binary.go new file mode 100644 index 000000000000..6a7885b9ca72 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/tcp_route.pb.binary.go @@ -0,0 +1,38 @@ +// Code generated by protoc-gen-go-binary. DO NOT EDIT. +// source: pbmesh/v1alpha1/tcp_route.proto + +package meshv1alpha1 + +import ( + "google.golang.org/protobuf/proto" +) + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *TCPRoute) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *TCPRoute) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *TCPRouteRule) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *TCPRouteRule) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} + +// MarshalBinary implements encoding.BinaryMarshaler +func (msg *TCPBackendRef) MarshalBinary() ([]byte, error) { + return proto.Marshal(msg) +} + +// UnmarshalBinary implements encoding.BinaryUnmarshaler +func (msg *TCPBackendRef) UnmarshalBinary(b []byte) error { + return proto.Unmarshal(b, msg) +} diff --git a/proto-public/pbmesh/v1alpha1/tcp_route.pb.go b/proto-public/pbmesh/v1alpha1/tcp_route.pb.go new file mode 100644 index 000000000000..6a8cf5700fc4 --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/tcp_route.pb.go @@ -0,0 +1,362 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: pbmesh/v1alpha1/tcp_route.proto + +package meshv1alpha1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// NOTE: this should align to the GAMMA/gateway-api version, or at least be +// easily translatable. +// +// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.TCPRoute +// +// This is a Resource type. +type TCPRoute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ParentRefs references the resources (usually Gateways) that a Route wants + // to be attached to. Note that the referenced parent resource needs to allow + // this for the attachment to be complete. For Gateways, that means the + // Gateway needs to allow attachment from Routes of this kind and namespace. + // + // It is invalid to reference an identical parent more than once. It is valid + // to reference multiple distinct sections within the same parent resource, + // such as 2 Listeners within a Gateway. + ParentRefs []*ParentReference `protobuf:"bytes,1,rep,name=parent_refs,json=parentRefs,proto3" json:"parent_refs,omitempty"` + // Rules are a list of TCP matchers and actions. + Rules []*TCPRouteRule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` +} + +func (x *TCPRoute) Reset() { + *x = TCPRoute{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TCPRoute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TCPRoute) ProtoMessage() {} + +func (x *TCPRoute) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TCPRoute.ProtoReflect.Descriptor instead. +func (*TCPRoute) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_tcp_route_proto_rawDescGZIP(), []int{0} +} + +func (x *TCPRoute) GetParentRefs() []*ParentReference { + if x != nil { + return x.ParentRefs + } + return nil +} + +func (x *TCPRoute) GetRules() []*TCPRouteRule { + if x != nil { + return x.Rules + } + return nil +} + +type TCPRouteRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // BackendRefs defines the backend(s) where matching requests should be sent. + // If unspecified or invalid (refers to a non-existent resource or a Service + // with no endpoints), the underlying implementation MUST actively reject + // connection attempts to this backend. Connection rejections must respect + // weight; if an invalid backend is requested to have 80% of connections, + // then 80% of connections must be rejected instead. + BackendRefs []*TCPBackendRef `protobuf:"bytes,1,rep,name=backend_refs,json=backendRefs,proto3" json:"backend_refs,omitempty"` +} + +func (x *TCPRouteRule) Reset() { + *x = TCPRouteRule{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TCPRouteRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TCPRouteRule) ProtoMessage() {} + +func (x *TCPRouteRule) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TCPRouteRule.ProtoReflect.Descriptor instead. +func (*TCPRouteRule) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_tcp_route_proto_rawDescGZIP(), []int{1} +} + +func (x *TCPRouteRule) GetBackendRefs() []*TCPBackendRef { + if x != nil { + return x.BackendRefs + } + return nil +} + +type TCPBackendRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BackendRef *BackendReference `protobuf:"bytes,1,opt,name=backend_ref,json=backendRef,proto3" json:"backend_ref,omitempty"` + // Weight specifies the proportion of requests forwarded to the referenced + // backend. This is computed as weight/(sum of all weights in this + // BackendRefs list). For non-zero values, there may be some epsilon from the + // exact proportion defined here depending on the precision an implementation + // supports. Weight is not a percentage and the sum of weights does not need + // to equal 100. + // + // If only one backend is specified and it has a weight greater than 0, 100% + // of the traffic is forwarded to that backend. If weight is set to 0, no + // traffic should be forwarded for this entry. If unspecified, weight defaults + // to 1. + Weight uint32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` +} + +func (x *TCPBackendRef) Reset() { + *x = TCPBackendRef{} + if protoimpl.UnsafeEnabled { + mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TCPBackendRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TCPBackendRef) ProtoMessage() {} + +func (x *TCPBackendRef) ProtoReflect() protoreflect.Message { + mi := &file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TCPBackendRef.ProtoReflect.Descriptor instead. +func (*TCPBackendRef) Descriptor() ([]byte, []int) { + return file_pbmesh_v1alpha1_tcp_route_proto_rawDescGZIP(), []int{2} +} + +func (x *TCPBackendRef) GetBackendRef() *BackendReference { + if x != nil { + return x.BackendRef + } + return nil +} + +func (x *TCPBackendRef) GetWeight() uint32 { + if x != nil { + return x.Weight + } + return 0 +} + +var File_pbmesh_v1alpha1_tcp_route_proto protoreflect.FileDescriptor + +var file_pbmesh_v1alpha1_tcp_route_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2f, 0x74, 0x63, 0x70, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x1e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, + 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x1a, 0x1c, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xa0, 0x01, 0x0a, 0x08, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2f, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, + 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x66, 0x73, 0x12, 0x42, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, + 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x22, 0x60, 0x0a, 0x0c, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, + 0x6c, 0x65, 0x12, 0x50, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, + 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, + 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x43, 0x50, 0x42, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x52, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x66, 0x73, 0x22, 0x7a, 0x0a, 0x0d, 0x54, 0x43, 0x50, 0x42, 0x61, 0x63, 0x6b, 0x65, + 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x51, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, + 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, 0x73, + 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0a, 0x62, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x42, 0x95, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, 0x54, 0x63, 0x70, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, + 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x2f, 0x70, 0x62, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x3b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, + 0x02, 0x03, 0x48, 0x43, 0x4d, 0xaa, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, + 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x4d, 0x65, 0x73, 0x68, 0x2e, 0x56, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1e, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, + 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, 0x56, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x2a, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, + 0x6f, 0x72, 0x70, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x5c, 0x4d, 0x65, 0x73, 0x68, 0x5c, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x48, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x3a, 0x3a, 0x4d, 0x65, 0x73, 0x68, 0x3a, 0x3a, + 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pbmesh_v1alpha1_tcp_route_proto_rawDescOnce sync.Once + file_pbmesh_v1alpha1_tcp_route_proto_rawDescData = file_pbmesh_v1alpha1_tcp_route_proto_rawDesc +) + +func file_pbmesh_v1alpha1_tcp_route_proto_rawDescGZIP() []byte { + file_pbmesh_v1alpha1_tcp_route_proto_rawDescOnce.Do(func() { + file_pbmesh_v1alpha1_tcp_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_pbmesh_v1alpha1_tcp_route_proto_rawDescData) + }) + return file_pbmesh_v1alpha1_tcp_route_proto_rawDescData +} + +var file_pbmesh_v1alpha1_tcp_route_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_pbmesh_v1alpha1_tcp_route_proto_goTypes = []interface{}{ + (*TCPRoute)(nil), // 0: hashicorp.consul.mesh.v1alpha1.TCPRoute + (*TCPRouteRule)(nil), // 1: hashicorp.consul.mesh.v1alpha1.TCPRouteRule + (*TCPBackendRef)(nil), // 2: hashicorp.consul.mesh.v1alpha1.TCPBackendRef + (*ParentReference)(nil), // 3: hashicorp.consul.mesh.v1alpha1.ParentReference + (*BackendReference)(nil), // 4: hashicorp.consul.mesh.v1alpha1.BackendReference +} +var file_pbmesh_v1alpha1_tcp_route_proto_depIdxs = []int32{ + 3, // 0: hashicorp.consul.mesh.v1alpha1.TCPRoute.parent_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference + 1, // 1: hashicorp.consul.mesh.v1alpha1.TCPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.TCPRouteRule + 2, // 2: hashicorp.consul.mesh.v1alpha1.TCPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.TCPBackendRef + 4, // 3: hashicorp.consul.mesh.v1alpha1.TCPBackendRef.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_pbmesh_v1alpha1_tcp_route_proto_init() } +func file_pbmesh_v1alpha1_tcp_route_proto_init() { + if File_pbmesh_v1alpha1_tcp_route_proto != nil { + return + } + file_pbmesh_v1alpha1_common_proto_init() + if !protoimpl.UnsafeEnabled { + file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TCPRoute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TCPRouteRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pbmesh_v1alpha1_tcp_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TCPBackendRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_pbmesh_v1alpha1_tcp_route_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_pbmesh_v1alpha1_tcp_route_proto_goTypes, + DependencyIndexes: file_pbmesh_v1alpha1_tcp_route_proto_depIdxs, + MessageInfos: file_pbmesh_v1alpha1_tcp_route_proto_msgTypes, + }.Build() + File_pbmesh_v1alpha1_tcp_route_proto = out.File + file_pbmesh_v1alpha1_tcp_route_proto_rawDesc = nil + file_pbmesh_v1alpha1_tcp_route_proto_goTypes = nil + file_pbmesh_v1alpha1_tcp_route_proto_depIdxs = nil +} diff --git a/proto-public/pbmesh/v1alpha1/tcp_route.proto b/proto-public/pbmesh/v1alpha1/tcp_route.proto new file mode 100644 index 000000000000..0a6c974c046b --- /dev/null +++ b/proto-public/pbmesh/v1alpha1/tcp_route.proto @@ -0,0 +1,56 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +syntax = "proto3"; + +package hashicorp.consul.mesh.v1alpha1; + +import "pbmesh/v1alpha1/common.proto"; + +// NOTE: this should align to the GAMMA/gateway-api version, or at least be +// easily translatable. +// +// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.TCPRoute +// +// This is a Resource type. +message TCPRoute { + // ParentRefs references the resources (usually Gateways) that a Route wants + // to be attached to. Note that the referenced parent resource needs to allow + // this for the attachment to be complete. For Gateways, that means the + // Gateway needs to allow attachment from Routes of this kind and namespace. + // + // It is invalid to reference an identical parent more than once. It is valid + // to reference multiple distinct sections within the same parent resource, + // such as 2 Listeners within a Gateway. + repeated ParentReference parent_refs = 1; + + // Rules are a list of TCP matchers and actions. + repeated TCPRouteRule rules = 2; +} + +message TCPRouteRule { + // BackendRefs defines the backend(s) where matching requests should be sent. + // If unspecified or invalid (refers to a non-existent resource or a Service + // with no endpoints), the underlying implementation MUST actively reject + // connection attempts to this backend. Connection rejections must respect + // weight; if an invalid backend is requested to have 80% of connections, + // then 80% of connections must be rejected instead. + repeated TCPBackendRef backend_refs = 1; +} + +message TCPBackendRef { + BackendReference backend_ref = 1; + + // Weight specifies the proportion of requests forwarded to the referenced + // backend. This is computed as weight/(sum of all weights in this + // BackendRefs list). For non-zero values, there may be some epsilon from the + // exact proportion defined here depending on the precision an implementation + // supports. Weight is not a percentage and the sum of weights does not need + // to equal 100. + // + //If only one backend is specified and it has a weight greater than 0, 100% + //of the traffic is forwarded to that backend. If weight is set to 0, no + //traffic should be forwarded for this entry. If unspecified, weight defaults + //to 1. + uint32 weight = 2; +}