From 406f3fa6a59760866bdfe1d370d62f4eaee9f374 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Thu, 21 Sep 2023 13:27:01 -0500 Subject: [PATCH] mesh: storing bound reference pointers on a ComputedRoutes resource --- .../internal/controllers/routes/bound_refs.go | 66 ++ .../internal/controllers/routes/controller.go | 6 + .../controllers/routes/controller_test.go | 224 +++++++ .../internal/controllers/routes/generate.go | 34 +- .../controllers/routes/generate_test.go | 75 +++ .../controllers/routes/xroutemapper/util.go | 11 + .../routes/xroutemapper/xroutemapper.go | 34 +- .../routes/xroutemapper/xroutemapper_test.go | 76 +++ .../sidecarproxy/controller_test.go | 1 + .../resource/mappers/bimapper/bimapper.go | 25 +- .../mappers/bimapper/bimapper_test.go | 133 ++++ internal/resource/sort.go | 71 +++ internal/resource/sort_test.go | 145 +++++ .../pbmesh/v1alpha1/computed_routes.pb.go | 582 +++++++++--------- .../pbmesh/v1alpha1/computed_routes.proto | 4 + 15 files changed, 1192 insertions(+), 295 deletions(-) create mode 100644 internal/mesh/internal/controllers/routes/bound_refs.go create mode 100644 internal/resource/sort.go create mode 100644 internal/resource/sort_test.go diff --git a/internal/mesh/internal/controllers/routes/bound_refs.go b/internal/mesh/internal/controllers/routes/bound_refs.go new file mode 100644 index 0000000000000..afdac8460be80 --- /dev/null +++ b/internal/mesh/internal/controllers/routes/bound_refs.go @@ -0,0 +1,66 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package routes + +import ( + "sort" + + "github.com/hashicorp/consul/internal/resource" + "github.com/hashicorp/consul/proto-public/pbresource" +) + +type sectionRefKey struct { + resource.ReferenceKey + Section string +} + +type BoundReferenceCollector struct { + refs map[sectionRefKey]*pbresource.Reference +} + +func NewBoundReferenceCollector() *BoundReferenceCollector { + return &BoundReferenceCollector{ + refs: make(map[sectionRefKey]*pbresource.Reference), + } +} + +func (c *BoundReferenceCollector) List() []*pbresource.Reference { + if len(c.refs) == 0 { + return nil + } + + out := make([]*pbresource.Reference, 0, len(c.refs)) + for _, ref := range c.refs { + out = append(out, ref) + } + + sort.Slice(out, func(i, j int) bool { + return resource.LessReference(out[i], out[j]) + }) + + return out +} + +func (c *BoundReferenceCollector) AddRefOrID(ref resource.ReferenceOrID) { + if c == nil { + return + } + c.AddRef(resource.ReferenceFromReferenceOrID(ref)) +} + +func (c *BoundReferenceCollector) AddRef(ref *pbresource.Reference) { + if c == nil { + return + } + srk := sectionRefKey{ + ReferenceKey: resource.NewReferenceKey(ref), + Section: ref.Section, + } + + if _, ok := c.refs[srk]; ok { + return + } + + c.refs[srk] = ref +} diff --git a/internal/mesh/internal/controllers/routes/controller.go b/internal/mesh/internal/controllers/routes/controller.go index bb17ad17def51..f2994120f275f 100644 --- a/internal/mesh/internal/controllers/routes/controller.go +++ b/internal/mesh/internal/controllers/routes/controller.go @@ -79,6 +79,12 @@ func (r *routesReconciler) Reconcile(ctx context.Context, rt controller.Runtime, return err } + if prev != nil { + r.mapper.TrackComputedRoutes(prev) + } else { + r.mapper.UntrackComputedRoutes(computedRoutesID) + } + if err := ensureComputedRoutesIsSynced(ctx, logger, rt.Client, result, prev); err != nil { return err } diff --git a/internal/mesh/internal/controllers/routes/controller_test.go b/internal/mesh/internal/controllers/routes/controller_test.go index 8ad9da0de9184..bfcad4a7f13f1 100644 --- a/internal/mesh/internal/controllers/routes/controller_test.go +++ b/internal/mesh/internal/controllers/routes/controller_test.go @@ -92,6 +92,9 @@ func (suite *controllerSuite) TestController() { testutil.RunStep(suite.T(), "default tcp route", func(t *testing.T) { // Check that the computed routes resource exists and it has one port that is the default. expect := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { UsingDefaultConfig: true, @@ -161,6 +164,9 @@ func (suite *controllerSuite) TestController() { testutil.RunStep(suite.T(), "default other routes", func(t *testing.T) { expect := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { UsingDefaultConfig: true, @@ -318,6 +324,13 @@ func (suite *controllerSuite) TestController() { testutil.RunStep(suite.T(), "one of each", func(t *testing.T) { expect := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + resource.Reference(grpcRoute1ID, ""), + resource.Reference(httpRoute1ID, ""), + resource.Reference(tcpRoute1ID, ""), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { Config: &pbmesh.ComputedPortRoutes_Tcp{ @@ -502,6 +515,16 @@ func (suite *controllerSuite) TestController() { testutil.RunStep(suite.T(), "one good one bad route", func(t *testing.T) { expect := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + resource.Reference(grpcRoute1ID, ""), + resource.Reference(grpcRoute2ID, ""), + resource.Reference(httpRoute1ID, ""), + resource.Reference(httpRoute2ID, ""), + resource.Reference(tcpRoute1ID, ""), + resource.Reference(tcpRoute2ID, ""), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { Config: &pbmesh.ComputedPortRoutes_Tcp{ @@ -737,6 +760,16 @@ func (suite *controllerSuite) TestController() { testutil.RunStep(suite.T(), "overlapping xRoutes generate conflicts", func(t *testing.T) { expect := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + resource.Reference(grpcRoute1ID, ""), + resource.Reference(grpcRoute2ID, ""), + resource.Reference(httpRoute1ID, ""), + resource.Reference(httpRoute2ID, ""), + resource.Reference(tcpRoute1ID, ""), + resource.Reference(tcpRoute2ID, ""), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { Config: &pbmesh.ComputedPortRoutes_Tcp{ @@ -896,6 +929,13 @@ func (suite *controllerSuite) TestController() { testutil.RunStep(suite.T(), "overlapping xRoutes due to port wildcarding", func(t *testing.T) { expect := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + resource.Reference(grpcRoute1ID, ""), + resource.Reference(httpRoute1ID, ""), + resource.Reference(tcpRoute1ID, ""), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { Config: &pbmesh.ComputedPortRoutes_Tcp{ @@ -1048,6 +1088,190 @@ func (suite *controllerSuite) TestController() { suite.client.WaitForStatusCondition(t, grpcRoute1ID, StatusKey, ConditionParentRefOutsideMesh(newRef(catalog.ServiceType, "api"))) }) + + // Get down to just 2 ports for all relevant services. + for _, name := range []string{"foo", "bar", "api"} { + _ = rtest.Resource(catalog.ServiceType, name). + WithTenancy(resource.DefaultNamespacedTenancy()). + WithData(suite.T(), &pbcatalog.Service{ + Workloads: &pbcatalog.WorkloadSelector{ + Prefixes: []string{name + "-"}, + }, + Ports: []*pbcatalog.ServicePort{ + {TargetPort: "mesh", Protocol: pbcatalog.Protocol_PROTOCOL_MESH}, + {TargetPort: "http", Protocol: pbcatalog.Protocol_PROTOCOL_HTTP}, + }, + }). + Write(suite.T(), suite.client) + } + + httpRoute1 = &pbmesh.HTTPRoute{ + ParentRefs: []*pbmesh.ParentReference{ + newParentRef(fooServiceRef, "http"), + newParentRef(barServiceRef, "http"), + }, + Rules: []*pbmesh.HTTPRouteRule{{ + BackendRefs: []*pbmesh.HTTPBackendRef{{ + BackendRef: newBackendRef(apiServiceRef, "", ""), + }}, + }}, + } + httpRoute1ID = rtest.Resource(types.HTTPRouteType, "route1"). + WithTenancy(resource.DefaultNamespacedTenancy()). + WithData(suite.T(), httpRoute1). + Write(suite.T(), suite.client). + Id + + var ( + fooLastVersion string + barLastVersion string + + fooComputedRoutesID = rtest.Resource(types.ComputedRoutesType, "foo"). + WithTenancy(resource.DefaultNamespacedTenancy()). + ID() + barComputedRoutesID = rtest.Resource(types.ComputedRoutesType, "bar"). + WithTenancy(resource.DefaultNamespacedTenancy()). + ID() + ) + + testutil.RunStep(suite.T(), "create a route linked to two parents", func(t *testing.T) { + expectFoo := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + resource.Reference(httpRoute1ID, ""), + }, + PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ + "http": { + Config: &pbmesh.ComputedPortRoutes_Http{ + Http: &pbmesh.ComputedHTTPRoute{ + Rules: []*pbmesh.ComputedHTTPRouteRule{ + { + Matches: defaultHTTPRouteMatches(), + BackendRefs: []*pbmesh.ComputedHTTPBackendRef{{ + BackendTarget: backendName("api", "http"), + }}, + }, + { + Matches: defaultHTTPRouteMatches(), + BackendRefs: []*pbmesh.ComputedHTTPBackendRef{{ + BackendTarget: types.NullRouteBackend, + }}, + }, + }, + }, + }, + ParentRef: newParentRef(fooServiceRef, "http"), + Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, + Targets: map[string]*pbmesh.BackendTargetDetails{ + backendName("api", "http"): { + Type: pbmesh.BackendTargetDetailsType_BACKEND_TARGET_DETAILS_TYPE_DIRECT, + MeshPort: "mesh", + BackendRef: newBackendRef(apiServiceRef, "http", ""), + }, + }, + }, + }, + } + expectBar := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + barServiceRef, + resource.Reference(httpRoute1ID, ""), + }, + PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ + "http": { + Config: &pbmesh.ComputedPortRoutes_Http{ + Http: &pbmesh.ComputedHTTPRoute{ + Rules: []*pbmesh.ComputedHTTPRouteRule{ + { + Matches: defaultHTTPRouteMatches(), + BackendRefs: []*pbmesh.ComputedHTTPBackendRef{{ + BackendTarget: backendName("api", "http"), + }}, + }, + { + Matches: defaultHTTPRouteMatches(), + BackendRefs: []*pbmesh.ComputedHTTPBackendRef{{ + BackendTarget: types.NullRouteBackend, + }}, + }, + }, + }, + }, + ParentRef: newParentRef(barServiceRef, "http"), + Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, + Targets: map[string]*pbmesh.BackendTargetDetails{ + backendName("api", "http"): { + Type: pbmesh.BackendTargetDetailsType_BACKEND_TARGET_DETAILS_TYPE_DIRECT, + MeshPort: "mesh", + BackendRef: newBackendRef(apiServiceRef, "http", ""), + }, + }, + }, + }, + } + + fooLastVersion = requireNewComputedRoutesVersion(t, suite.client, fooComputedRoutesID, fooLastVersion, expectFoo) + barLastVersion = requireNewComputedRoutesVersion(t, suite.client, barComputedRoutesID, barLastVersion, expectBar) + + suite.client.WaitForStatusCondition(t, httpRoute1ID, StatusKey, ConditionXRouteOK) + }) + + // Remove bar parent + httpRoute1 = &pbmesh.HTTPRoute{ + ParentRefs: []*pbmesh.ParentReference{ + newParentRef(fooServiceRef, "http"), + }, + Rules: []*pbmesh.HTTPRouteRule{{ + BackendRefs: []*pbmesh.HTTPBackendRef{{ + BackendRef: newBackendRef(apiServiceRef, "", ""), + }}, + }}, + } + httpRoute1ID = rtest.Resource(types.HTTPRouteType, "route1"). + WithTenancy(resource.DefaultNamespacedTenancy()). + WithData(suite.T(), httpRoute1). + Write(suite.T(), suite.client). + Id + + testutil.RunStep(suite.T(), "remove a parent ref and show that the old computed routes is reconciled one more time", func(t *testing.T) { + expectBar := &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + barServiceRef, + }, + PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ + "http": { + Config: &pbmesh.ComputedPortRoutes_Http{ + Http: &pbmesh.ComputedHTTPRoute{ + Rules: []*pbmesh.ComputedHTTPRouteRule{ + { + Matches: defaultHTTPRouteMatches(), + BackendRefs: []*pbmesh.ComputedHTTPBackendRef{{ + BackendTarget: backendName("bar", "http"), + }}, + }, + }, + }, + }, + UsingDefaultConfig: true, + ParentRef: newParentRef(barServiceRef, "http"), + Protocol: pbcatalog.Protocol_PROTOCOL_HTTP, + Targets: map[string]*pbmesh.BackendTargetDetails{ + backendName("bar", "http"): { + Type: pbmesh.BackendTargetDetailsType_BACKEND_TARGET_DETAILS_TYPE_DIRECT, + MeshPort: "mesh", + BackendRef: newBackendRef(barServiceRef, "http", ""), + }, + }, + }, + }, + } + + barLastVersion = requireNewComputedRoutesVersion(t, suite.client, barComputedRoutesID, barLastVersion, expectBar) + + suite.client.WaitForStatusCondition(t, httpRoute1ID, StatusKey, ConditionXRouteOK) + }) } func newParentRef(ref *pbresource.Reference, port string) *pbmesh.ParentReference { diff --git a/internal/mesh/internal/controllers/routes/generate.go b/internal/mesh/internal/controllers/routes/generate.go index 8cd40b3460787..42bf2b8c36cc6 100644 --- a/internal/mesh/internal/controllers/routes/generate.go +++ b/internal/mesh/internal/controllers/routes/generate.go @@ -59,6 +59,8 @@ func compile( parentServiceRef := resource.Reference(parentServiceID, "") + boundRefCollector := NewBoundReferenceCollector() + parentServiceDec := related.GetService(parentServiceID) if parentServiceDec == nil { return &ComputedRoutesResult{ @@ -68,6 +70,8 @@ func compile( } parentServiceID = parentServiceDec.Resource.Id // get ULID out of it + boundRefCollector.AddRefOrID(parentServiceRef) + var ( inMesh = false parentMeshPort string @@ -127,6 +131,7 @@ func compile( if len(ports) == 0 { return // not relevant to this computed routes } + boundRefCollector.AddRefOrID(res.Id) for _, port := range ports { if port == "" { @@ -136,11 +141,11 @@ func compile( var node *inputRouteNode switch route := xroute.(type) { case *pbmesh.HTTPRoute: - node = compileHTTPRouteNode(port, res, route, related) + node = compileHTTPRouteNode(port, res, route, related, boundRefCollector) case *pbmesh.GRPCRoute: - node = compileGRPCRouteNode(port, res, route, related) + node = compileGRPCRouteNode(port, res, route, related, boundRefCollector) case *pbmesh.TCPRoute: - node = compileTCPRouteNode(port, res, route, related) + node = compileTCPRouteNode(port, res, route, related, boundRefCollector) default: panic(fmt.Sprintf("unexpected xroute type: %T", xroute)) } @@ -282,16 +287,20 @@ func compile( if svc == nil { panic("impossible at this point; should already have been handled before getting here") } + boundRefCollector.AddRefOrID(svcRef) failoverPolicy := related.GetFailoverPolicyForService(svcRef) if failoverPolicy != nil { simpleFailoverPolicy := catalog.SimplifyFailoverPolicy(svc.Data, failoverPolicy.Data) portFailoverConfig, ok := simpleFailoverPolicy.PortConfigs[details.BackendRef.Port] if ok { + boundRefCollector.AddRefOrID(failoverPolicy.Resource.Id) + details.FailoverConfig = compileFailoverConfig( related, portFailoverConfig, mc.Targets, + boundRefCollector, ) } } @@ -305,6 +314,7 @@ func compile( if destPolicy != nil { portDestConfig, ok := destPolicy.Data.PortConfigs[details.BackendRef.Port] if ok { + boundRefCollector.AddRefOrID(destPolicy.Resource.Id) details.DestinationConfig = portDestConfig } } @@ -321,6 +331,8 @@ func compile( } } + computedRoutes.BoundReferences = boundRefCollector.List() + return &ComputedRoutesResult{ ID: computedRoutesID, OwnerID: parentServiceID, @@ -332,6 +344,7 @@ func compileFailoverConfig( related *loader.RelatedResources, failoverConfig *pbcatalog.FailoverConfig, targets map[string]*pbmesh.BackendTargetDetails, + brc *BoundReferenceCollector, ) *pbmesh.ComputedFailoverConfig { if failoverConfig == nil { return nil @@ -354,6 +367,9 @@ func compileFailoverConfig( destSvcRef := dest.Ref svc := related.GetService(destSvcRef) + if svc != nil { + brc.AddRefOrID(svc.Resource.Id) + } var backendTargetName string ok, meshPort := shouldRouteTrafficToBackend(svc, backendRef) @@ -385,6 +401,7 @@ func compileHTTPRouteNode( res *pbresource.Resource, route *pbmesh.HTTPRoute, serviceGetter serviceGetter, + brc *BoundReferenceCollector, ) *inputRouteNode { route = protoClone(route) node := newInputRouteNode(port) @@ -427,6 +444,9 @@ func compileHTTPRouteNode( backendTarget string backendSvc = serviceGetter.GetService(backendRef.BackendRef.Ref) ) + if backendSvc != nil { + brc.AddRefOrID(backendSvc.Resource.Id) + } if ok, meshPort := shouldRouteTrafficToBackend(backendSvc, backendRef.BackendRef); ok { details := &pbmesh.BackendTargetDetails{ Type: pbmesh.BackendTargetDetailsType_BACKEND_TARGET_DETAILS_TYPE_DIRECT, @@ -456,6 +476,7 @@ func compileGRPCRouteNode( res *pbresource.Resource, route *pbmesh.GRPCRoute, serviceGetter serviceGetter, + brc *BoundReferenceCollector, ) *inputRouteNode { route = protoClone(route) @@ -490,6 +511,9 @@ func compileGRPCRouteNode( backendTarget string backendSvc = serviceGetter.GetService(backendRef.BackendRef.Ref) ) + if backendSvc != nil { + brc.AddRefOrID(backendSvc.Resource.Id) + } if ok, meshPort := shouldRouteTrafficToBackend(backendSvc, backendRef.BackendRef); ok { details := &pbmesh.BackendTargetDetails{ Type: pbmesh.BackendTargetDetailsType_BACKEND_TARGET_DETAILS_TYPE_DIRECT, @@ -520,6 +544,7 @@ func compileTCPRouteNode( res *pbresource.Resource, route *pbmesh.TCPRoute, serviceGetter serviceGetter, + brc *BoundReferenceCollector, ) *inputRouteNode { route = protoClone(route) @@ -545,6 +570,9 @@ func compileTCPRouteNode( backendTarget string backendSvc = serviceGetter.GetService(backendRef.BackendRef.Ref) ) + if backendSvc != nil { + brc.AddRefOrID(backendSvc.Resource.Id) + } if ok, meshPort := shouldRouteTrafficToBackend(backendSvc, backendRef.BackendRef); ok { details := &pbmesh.BackendTargetDetails{ Type: pbmesh.BackendTargetDetailsType_BACKEND_TARGET_DETAILS_TYPE_DIRECT, diff --git a/internal/mesh/internal/controllers/routes/generate_test.go b/internal/mesh/internal/controllers/routes/generate_test.go index 21ef3f3f14725..379a35104f3b0 100644 --- a/internal/mesh/internal/controllers/routes/generate_test.go +++ b/internal/mesh/internal/controllers/routes/generate_test.go @@ -202,6 +202,9 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { Config: &pbmesh.ComputedPortRoutes_Tcp{ @@ -253,6 +256,9 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ protoName: { Config: &pbmesh.ComputedPortRoutes_Http{ @@ -307,6 +313,9 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "grpc": { Config: &pbmesh.ComputedPortRoutes_Grpc{ @@ -411,6 +420,13 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + newRef(types.GRPCRouteType, "api-grpc-route1"), + newRef(types.HTTPRouteType, "api-http-route1"), + newRef(types.TCPRouteType, "api-tcp-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { Config: &pbmesh.ComputedPortRoutes_Tcp{ @@ -607,6 +623,11 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + newRef(types.HTTPRouteType, "api-http-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ // note: tcp has been upgraded to http in the presence of an HTTPRoute "tcp": chunk("tcp", pbcatalog.Protocol_PROTOCOL_HTTP), @@ -674,6 +695,9 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { Config: &pbmesh.ComputedPortRoutes_Http{ @@ -753,6 +777,9 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { Config: &pbmesh.ComputedPortRoutes_Http{ @@ -852,6 +879,12 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + resource.Reference(httpRoute.Resource.Id, ""), + resource.Reference(tcpRoute.Resource.Id, ""), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { Config: &pbmesh.ComputedPortRoutes_Http{ @@ -981,6 +1014,13 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + barServiceRef, + fooServiceRef, + newRef(types.HTTPRouteType, "api-http-route1"), + newRef(types.HTTPRouteType, "api-http-route2"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { Config: &pbmesh.ComputedPortRoutes_Http{ @@ -1085,6 +1125,11 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + newRef(types.HTTPRouteType, "api-http-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { Config: &pbmesh.ComputedPortRoutes_Http{ @@ -1155,6 +1200,10 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + newRef(types.HTTPRouteType, "api-http-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { ParentRef: newParentRef(apiServiceRef, "http"), @@ -1216,6 +1265,10 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + newRef(types.GRPCRouteType, "api-grpc-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "grpc": { ParentRef: newParentRef(apiServiceRef, "grpc"), @@ -1277,6 +1330,10 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + newRef(types.TCPRouteType, "api-tcp-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "tcp": { ParentRef: newParentRef(apiServiceRef, "tcp"), @@ -1343,6 +1400,11 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + newRef(types.HTTPRouteType, "api-http-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { ParentRef: newParentRef(apiServiceRef, "http"), @@ -1434,6 +1496,12 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiServiceRef, + fooServiceRef, + newRef(types.DestinationPolicyType, "foo"), + newRef(types.HTTPRouteType, "api-http-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { Config: &pbmesh.ComputedPortRoutes_Http{ @@ -1548,6 +1616,13 @@ func TestGenerateComputedRoutes(t *testing.T) { ID: apiComputedRoutesID, OwnerID: apiServiceID, Data: &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + newRef(catalog.FailoverPolicyType, "foo"), + apiServiceRef, + barServiceRef, + fooServiceRef, + newRef(types.HTTPRouteType, "api-http-route1"), + }, PortedConfigs: map[string]*pbmesh.ComputedPortRoutes{ "http": { Config: &pbmesh.ComputedPortRoutes_Http{ diff --git a/internal/mesh/internal/controllers/routes/xroutemapper/util.go b/internal/mesh/internal/controllers/routes/xroutemapper/util.go index 6ba99bb65b907..1f8786736f77f 100644 --- a/internal/mesh/internal/controllers/routes/xroutemapper/util.go +++ b/internal/mesh/internal/controllers/routes/xroutemapper/util.go @@ -9,6 +9,17 @@ import ( "github.com/hashicorp/consul/proto-public/pbresource" ) +func refSliceToRefSlice(refs []*pbresource.Reference) []resource.ReferenceOrID { + if refs == nil { + return nil + } + out := make([]resource.ReferenceOrID, 0, len(refs)) + for _, ref := range refs { + out = append(out, ref) + } + return out +} + func parentRefSliceToRefSlice(parentRefs []*pbmesh.ParentReference) []resource.ReferenceOrID { if parentRefs == nil { return nil diff --git a/internal/mesh/internal/controllers/routes/xroutemapper/xroutemapper.go b/internal/mesh/internal/controllers/routes/xroutemapper/xroutemapper.go index c49f0a6c270d1..e209b113a990c 100644 --- a/internal/mesh/internal/controllers/routes/xroutemapper/xroutemapper.go +++ b/internal/mesh/internal/controllers/routes/xroutemapper/xroutemapper.go @@ -29,6 +29,8 @@ import ( // the data causing the event to notice something has been deleted and to // untrack it here. type Mapper struct { + boundRefMapper *bimapper.Mapper + httpRouteParentMapper *bimapper.Mapper grpcRouteParentMapper *bimapper.Mapper tcpRouteParentMapper *bimapper.Mapper @@ -43,6 +45,8 @@ type Mapper struct { // New creates a new Mapper. func New() *Mapper { return &Mapper{ + boundRefMapper: bimapper.NewWithWildcardLinkType(types.ComputedRoutesType), + httpRouteParentMapper: bimapper.New(types.HTTPRouteType, catalog.ServiceType), grpcRouteParentMapper: bimapper.New(types.GRPCRouteType, catalog.ServiceType), tcpRouteParentMapper: bimapper.New(types.TCPRouteType, catalog.ServiceType), @@ -88,6 +92,17 @@ func (m *Mapper) walkRouteBackendBiMappers(fn func(bm *bimapper.Mapper)) { } } +func (m *Mapper) TrackComputedRoutes(cr *types.DecodedComputedRoutes) { + if cr != nil { + refs := refSliceToRefSlice(cr.Data.BoundReferences) + m.boundRefMapper.TrackItem(cr.Resource.Id, refs) + } +} + +func (m *Mapper) UntrackComputedRoutes(id *pbresource.ID) { + m.boundRefMapper.UntrackItem(id) +} + // TrackXRoute indexes the xRoute->parentRefService and // xRoute->backendRefService relationship. func (m *Mapper) TrackXRoute(id *pbresource.ID, xroute types.XRouteData) { @@ -180,10 +195,16 @@ func mapXRouteToComputedRoutes[T types.XRouteData](res *pbresource.Resource, m * m.TrackXRoute(res.Id, route) - return controller.MakeRequests( - types.ComputedRoutesType, - parentRefSliceToRefSlice(route.GetParentRefs()), - ), nil + refs := parentRefSliceToRefSlice(route.GetParentRefs()) + + // Augment with any bound refs to cover the case where an xRoute used to + // have a parentRef to a service and now no longer does. + prevRefs := m.boundRefMapper.ItemRefsForLink(dec.Resource.Id) + for _, ref := range prevRefs { + refs = append(refs, ref) + } + + return controller.MakeRequests(types.ComputedRoutesType, refs), nil } func (m *Mapper) MapFailoverPolicy( @@ -206,6 +227,8 @@ func (m *Mapper) MapFailoverPolicy( // will route any traffic to this destination service. svcID := resource.ReplaceType(catalog.ServiceType, res.Id) + // TODO: use bound refs here? + return m.mapXRouteDirectServiceRefToComputedRoutesByID(svcID) } @@ -232,6 +255,8 @@ func (m *Mapper) MapDestinationPolicy( // will route any traffic to this destination service. svcID := resource.ReplaceType(catalog.ServiceType, res.Id) + // TODO: use bound refs here? + return m.mapXRouteDirectServiceRefToComputedRoutesByID(svcID) } @@ -262,6 +287,7 @@ func (m *Mapper) MapService( reqs = append(reqs, got...) } + // TODO: use bound refs here? return reqs, nil } diff --git a/internal/mesh/internal/controllers/routes/xroutemapper/xroutemapper_test.go b/internal/mesh/internal/controllers/routes/xroutemapper/xroutemapper_test.go index 422db03c07f21..b6e5db4e8013c 100644 --- a/internal/mesh/internal/controllers/routes/xroutemapper/xroutemapper_test.go +++ b/internal/mesh/internal/controllers/routes/xroutemapper/xroutemapper_test.go @@ -533,6 +533,82 @@ func testMapper_Tracking(t *testing.T, typ *pbresource.Type, newRoute func(t *te require.Empty(t, m.RouteIDsByParentServiceRef(ref)) } }) + + testutil.RunStep(t, "removal of a parent still triggers for old computed routes until the bound reference is cleared", func(t *testing.T) { + route1 = rtest.Resource(typ, "route-1"). + WithTenancy(resource.DefaultNamespacedTenancy()). + WithData(t, newRoute(t, + []*pbmesh.ParentReference{ + {Ref: newRef(catalog.ServiceType, "bar")}, + {Ref: newRef(catalog.ServiceType, "foo")}, + }, + []*pbmesh.BackendReference{ + newBackendRef("api"), + }, + )).Build() + rtest.ValidateAndNormalize(t, registry, route1) + + requireTracking(t, m, route1, barComputedRoutes, fooComputedRoutes) + + // Simulate a Reconcile that would update the mapper. + // + // NOTE: we do not ValidateAndNormalize these since the mapper doesn't use the data. + fooCR := rtest.ResourceID(fooComputedRoutes). + WithTenancy(resource.DefaultNamespacedTenancy()). + WithData(t, &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiSvcRef, + fooSvcRef, + resource.Reference(route1.Id, ""), + }, + }).Build() + m.TrackComputedRoutes(rtest.MustDecode[*pbmesh.ComputedRoutes](t, fooCR)) + + barCR := rtest.ResourceID(barComputedRoutes). + WithTenancy(resource.DefaultNamespacedTenancy()). + WithData(t, &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiSvcRef, + barSvcRef, + resource.Reference(route1.Id, ""), + }, + }).Build() + m.TrackComputedRoutes(rtest.MustDecode[*pbmesh.ComputedRoutes](t, barCR)) + + // Still has the same tracking. + requireTracking(t, m, route1, barComputedRoutes, fooComputedRoutes) + + // Now change the route to remove "bar" + + route1 = rtest.Resource(typ, "route-1"). + WithTenancy(resource.DefaultNamespacedTenancy()). + WithData(t, newRoute(t, + []*pbmesh.ParentReference{ + {Ref: newRef(catalog.ServiceType, "foo")}, + }, + []*pbmesh.BackendReference{ + newBackendRef("api"), + }, + )).Build() + rtest.ValidateAndNormalize(t, registry, route1) + + // Now we see that it still emits the event for bar, so we get a chance to update it. + requireTracking(t, m, route1, barComputedRoutes, fooComputedRoutes) + + // Update the bound references on 'bar' to remove the route + barCR = rtest.ResourceID(barComputedRoutes). + WithTenancy(resource.DefaultNamespacedTenancy()). + WithData(t, &pbmesh.ComputedRoutes{ + BoundReferences: []*pbresource.Reference{ + apiSvcRef, + barSvcRef, + }, + }).Build() + m.TrackComputedRoutes(rtest.MustDecode[*pbmesh.ComputedRoutes](t, barCR)) + + // Now 'bar' no longer has a link to the route. + requireTracking(t, m, route1, fooComputedRoutes) + }) } func requireTracking( diff --git a/internal/mesh/internal/controllers/sidecarproxy/controller_test.go b/internal/mesh/internal/controllers/sidecarproxy/controller_test.go index 6aab1931e873d..29f11505d7784 100644 --- a/internal/mesh/internal/controllers/sidecarproxy/controller_test.go +++ b/internal/mesh/internal/controllers/sidecarproxy/controller_test.go @@ -604,6 +604,7 @@ func (suite *meshControllerTestSuite) TestController() { }}, } route := resourcetest.Resource(types.HTTPRouteType, "db-http-route"). + WithTenancy(resource.DefaultNamespacedTenancy()). WithData(t, routeData). Build() require.NoError(t, types.MutateHTTPRoute(route)) diff --git a/internal/resource/mappers/bimapper/bimapper.go b/internal/resource/mappers/bimapper/bimapper.go index ee617d8807616..f1c2f5122676e 100644 --- a/internal/resource/mappers/bimapper/bimapper.go +++ b/internal/resource/mappers/bimapper/bimapper.go @@ -13,6 +13,12 @@ import ( "github.com/hashicorp/consul/proto-public/pbresource" ) +var wildcardType = &pbresource.Type{ + Group: "@@any@@", + GroupVersion: "@@any@@", + Kind: "@@any@@", +} + // Mapper tracks bidirectional lookup for an item that contains references to // other items. For example: an HTTPRoute has many references to Services. // @@ -20,6 +26,7 @@ import ( // Tracking is done on items. type Mapper struct { itemType, linkType *pbresource.Type + wildcardLink bool lock sync.Mutex itemToLink map[resource.ReferenceKey]map[resource.ReferenceKey]struct{} @@ -42,6 +49,14 @@ func New(itemType, linkType *pbresource.Type) *Mapper { } } +// NewWithWildcardLinkType creates a bimapper between the provided item type +// and can have a mixed set of link types. +func NewWithWildcardLinkType(itemType *pbresource.Type) *Mapper { + m := New(itemType, wildcardType) + m.wildcardLink = true + return m +} + // Reset clears the internal mappings. func (m *Mapper) Reset() { m.lock.Lock() @@ -72,7 +87,7 @@ func (m *Mapper) UntrackItem(item resource.ReferenceOrID) { // UntrackLink removes tracking for the provided link. The link type MUST match // the type configured for the link. func (m *Mapper) UntrackLink(link resource.ReferenceOrID) { - if !resource.EqualType(link.GetType(), m.linkType) { + if !m.wildcardLink && !resource.EqualType(link.GetType(), m.linkType) { panic(fmt.Sprintf("expected link type %q got %q", resource.TypeToString(m.linkType), resource.TypeToString(link.GetType()), @@ -105,7 +120,7 @@ func (m *Mapper) TrackItem(item resource.ReferenceOrID, links []resource.Referen linksAsKeys := make([]resource.ReferenceKey, 0, len(links)) for _, link := range links { - if !resource.EqualType(link.GetType(), m.linkType) { + if !m.wildcardLink && !resource.EqualType(link.GetType(), m.linkType) { panic(fmt.Sprintf("expected link type %q got %q", resource.TypeToString(m.linkType), resource.TypeToString(link.GetType()), @@ -223,7 +238,7 @@ func (m *Mapper) ItemsForLink(link *pbresource.ID) []*pbresource.ID { // ItemIDsForLink returns item ids for items related to the provided link. func (m *Mapper) ItemIDsForLink(link resource.ReferenceOrID) []*pbresource.ID { - if !resource.EqualType(link.GetType(), m.linkType) { + if !m.wildcardLink && !resource.EqualType(link.GetType(), m.linkType) { panic(fmt.Sprintf("expected link type %q got %q", resource.TypeToString(m.linkType), resource.TypeToString(link.GetType()), @@ -235,7 +250,7 @@ func (m *Mapper) ItemIDsForLink(link resource.ReferenceOrID) []*pbresource.ID { // ItemRefsForLink returns item references for items related to the provided link. func (m *Mapper) ItemRefsForLink(link resource.ReferenceOrID) []*pbresource.Reference { - if !resource.EqualType(link.GetType(), m.linkType) { + if !m.wildcardLink && !resource.EqualType(link.GetType(), m.linkType) { panic(fmt.Sprintf("expected link type %q got %q", resource.TypeToString(m.linkType), resource.TypeToString(link.GetType()), @@ -249,7 +264,7 @@ func (m *Mapper) ItemRefsForLink(link resource.ReferenceOrID) []*pbresource.Refe func (m *Mapper) MapLink(_ context.Context, _ controller.Runtime, res *pbresource.Resource) ([]controller.Request, error) { link := res.Id - if !resource.EqualType(link.Type, m.linkType) { + if !m.wildcardLink && !resource.EqualType(link.Type, m.linkType) { return nil, fmt.Errorf("expected type %q got %q", resource.TypeToString(m.linkType), resource.TypeToString(link.Type), diff --git a/internal/resource/mappers/bimapper/bimapper_test.go b/internal/resource/mappers/bimapper/bimapper_test.go index e541a1e2587f8..00dac874bc303 100644 --- a/internal/resource/mappers/bimapper/bimapper_test.go +++ b/internal/resource/mappers/bimapper/bimapper_test.go @@ -32,6 +32,11 @@ var ( GroupVersion: fakeVersion, Kind: "Bar", } + fakeBazType = &pbresource.Type{ + Group: fakeGroupName, + GroupVersion: fakeVersion, + Kind: "Baz", + } ) func TestMapper(t *testing.T) { @@ -211,6 +216,134 @@ func TestMapper(t *testing.T) { require.True(t, m.IsEmpty()) } +func TestMapper_Wildcard(t *testing.T) { + bar1Ref := newRef(fakeBarType, "uno") + bar2Ref := newRef(fakeBarType, "dos") + + baz1Ref := newRef(fakeBazType, "uno") + baz2Ref := newRef(fakeBazType, "dos") + + m := NewWithWildcardLinkType(fakeFooType) + + foo1 := rtest.Resource(fakeFooType, "foo1"). + WithTenancy(resource.DefaultNamespacedTenancy()). + Build() + foo1Refs := []resource.ReferenceOrID{ + bar1Ref, + baz1Ref, + } + + foo2 := rtest.Resource(fakeFooType, "foo2"). + WithTenancy(resource.DefaultNamespacedTenancy()). + Build() + foo2Refs := []resource.ReferenceOrID{ + bar1Ref, + bar2Ref, + baz2Ref, + } + foo2UpdatedRefs := []resource.ReferenceOrID{ + bar2Ref, + baz2Ref, + } + + // Nothing tracked yet so we assume nothing. + requireLinksForItem(t, m, foo1.Id) + requireLinksForItem(t, m, foo2.Id) + requireItemsForLink(t, m, bar1Ref) + requireItemsForLink(t, m, bar2Ref) + requireItemsForLink(t, m, baz1Ref) + requireItemsForLink(t, m, baz2Ref) + + // no-ops + m.UntrackItem(foo1.Id) + + // still nothing + requireLinksForItem(t, m, foo1.Id) + requireLinksForItem(t, m, foo2.Id) + requireItemsForLink(t, m, bar1Ref) + requireItemsForLink(t, m, bar2Ref) + requireItemsForLink(t, m, baz1Ref) + requireItemsForLink(t, m, baz2Ref) + + // Actually insert some data. + m.TrackItem(foo1.Id, foo1Refs) + + // Check links mapping + requireLinksForItem(t, m, foo1.Id, foo1Refs...) + requireItemsForLink(t, m, bar1Ref, foo1.Id) + requireItemsForLink(t, m, bar2Ref) + requireItemsForLink(t, m, baz1Ref, foo1.Id) + requireItemsForLink(t, m, baz2Ref) + + // track it again, no change + m.TrackItem(foo1.Id, foo1Refs) + + requireLinksForItem(t, m, foo1.Id, foo1Refs...) + requireItemsForLink(t, m, bar1Ref, foo1.Id) + requireItemsForLink(t, m, bar2Ref) + requireItemsForLink(t, m, baz1Ref, foo1.Id) + requireItemsForLink(t, m, baz2Ref) + + // track new one that overlaps slightly + m.TrackItem(foo2.Id, foo2Refs) + + // Check links mapping for the new one + requireLinksForItem(t, m, foo1.Id, foo1Refs...) + requireLinksForItem(t, m, foo2.Id, foo2Refs...) + requireItemsForLink(t, m, bar1Ref, foo1.Id, foo2.Id) + requireItemsForLink(t, m, bar2Ref, foo2.Id) + requireItemsForLink(t, m, baz1Ref, foo1.Id) + requireItemsForLink(t, m, baz2Ref, foo2.Id) + + // update the original to change it + m.TrackItem(foo2.Id, foo2UpdatedRefs) + + requireLinksForItem(t, m, foo1.Id, foo1Refs...) + requireLinksForItem(t, m, foo2.Id, foo2UpdatedRefs...) + requireItemsForLink(t, m, bar1Ref, foo1.Id) + requireItemsForLink(t, m, bar2Ref, foo2.Id) + requireItemsForLink(t, m, baz1Ref, foo1.Id) + requireItemsForLink(t, m, baz2Ref, foo2.Id) + + // delete the original + m.UntrackItem(foo1.Id) + + requireLinksForItem(t, m, foo1.Id) + requireLinksForItem(t, m, foo2.Id, foo2UpdatedRefs...) + requireItemsForLink(t, m, bar1Ref) + requireItemsForLink(t, m, bar2Ref, foo2.Id) + requireItemsForLink(t, m, baz1Ref) + requireItemsForLink(t, m, baz2Ref, foo2.Id) + + // delete the link + m.UntrackLink(baz2Ref) + + foo2DoubleUpdatedRefs := []resource.ReferenceOrID{ + bar2Ref, + } + + requireLinksForItem(t, m, foo1.Id) + requireLinksForItem(t, m, foo2.Id, foo2DoubleUpdatedRefs...) + requireItemsForLink(t, m, bar1Ref) + requireItemsForLink(t, m, bar2Ref, foo2.Id) + requireItemsForLink(t, m, baz1Ref) + requireItemsForLink(t, m, baz2Ref) + + // delete another item + m.UntrackItem(foo2.Id) + + requireLinksForItem(t, m, foo1.Id) + requireLinksForItem(t, m, foo2.Id) + requireItemsForLink(t, m, bar1Ref) + requireItemsForLink(t, m, bar2Ref) + requireItemsForLink(t, m, baz1Ref) + requireItemsForLink(t, m, baz2Ref) + + // Reset the mapper and check that its internal maps are empty. + m.Reset() + require.True(t, m.IsEmpty()) +} + func TestPanics(t *testing.T) { t.Run("new mapper without types", func(t *testing.T) { require.PanicsWithValue(t, "itemType is required", func() { diff --git a/internal/resource/sort.go b/internal/resource/sort.go new file mode 100644 index 0000000000000..1373f08e14213 --- /dev/null +++ b/internal/resource/sort.go @@ -0,0 +1,71 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package resource + +import "github.com/hashicorp/consul/proto-public/pbresource" + +func LessReference(a, b *pbresource.Reference) bool { + return compareReference(a, b) < 0 +} + +func compareReference(a, b *pbresource.Reference) int { + if a == nil || b == nil { + panic("nil references cannot be compared") + } + + diff := compareType(a.Type, b.Type) + if diff != 0 { + return diff + } + diff = compareTenancy(a.Tenancy, b.Tenancy) + if diff != 0 { + return diff + } + diff = compareString(a.Name, b.Name) + if diff != 0 { + return diff + } + return compareString(a.Section, b.Section) +} + +func compareType(a, b *pbresource.Type) int { + if a == nil || b == nil { + panic("nil types cannot be compared") + } + diff := compareString(a.Group, b.Group) + if diff != 0 { + return diff + } + diff = compareString(a.GroupVersion, b.GroupVersion) + if diff != 0 { + return diff + } + return compareString(a.Kind, b.Kind) +} + +func compareTenancy(a, b *pbresource.Tenancy) int { + if a == nil || b == nil { + panic("nil tenancies cannot be compared") + } + diff := compareString(a.Partition, b.Partition) + if diff != 0 { + return diff + } + diff = compareString(a.PeerName, b.PeerName) + if diff != 0 { + return diff + } + return compareString(a.Namespace, b.Namespace) +} + +func compareString(a, b string) int { + switch { + case a < b: + return -1 + case a > b: + return 1 + default: + return 0 + } +} diff --git a/internal/resource/sort_test.go b/internal/resource/sort_test.go new file mode 100644 index 0000000000000..e319266d9a925 --- /dev/null +++ b/internal/resource/sort_test.go @@ -0,0 +1,145 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package resource + +import ( + "fmt" + "math/rand" + "sort" + "strings" + "testing" + + "github.com/stretchr/testify/require" + "google.golang.org/protobuf/proto" + + "github.com/hashicorp/consul/proto-public/pbresource" +) + +func TestLessReference(t *testing.T) { + parseTenancy := func(s string) *pbresource.Tenancy { + // format is: .. + parts := strings.Split(s, ".") + if len(parts) != 3 { + panic("bad tenancy") + } + return &pbresource.Tenancy{ + Partition: parts[0], + PeerName: parts[1], + Namespace: parts[2], + } + } + + makeRef := func(s string) *pbresource.Reference { + // format is: + // - //@
+ // - // + // + // type = (gvk style) + // tenancy = .. + + parts := strings.Split(s, "/") + require.Len(t, parts, 3) + + name, section, _ := strings.Cut(parts[2], "@") + + return &pbresource.Reference{ + Type: GVKToType(parts[0]), + Tenancy: parseTenancy(parts[1]), + Name: name, + Section: section, + } + } + + var inputs []*pbresource.Reference + + stringify := func(all []*pbresource.Reference) []string { + var out []string + for _, ref := range all { + out = append(out, ReferenceToString(ref)) + } + return out + } + + // We generate pre-sorted data. + vals := []string{"a", "aa", "b", "bb"} + sectionVals := append([]string{""}, vals...) + for _, group := range vals { + for _, version := range vals { + for _, kind := range vals { + for _, partition := range vals { + for _, peer := range vals { + for _, namespace := range vals { + for _, name := range vals { + for _, section := range sectionVals { + if section != "" { + section = "@" + section + } + inputs = append(inputs, makeRef( + fmt.Sprintf( + "%s.%s.%s/%s.%s.%s/%s%s", + group, version, kind, + partition, peer, namespace, + name, section, + ), + )) + } + } + } + } + } + } + } + } + + require.True(t, sort.IsSorted(sortedReferences(inputs))) + + const randomTrials = 5 + + mixed := protoSliceClone(inputs) + for i := 0; i < randomTrials; i++ { + rand.Shuffle(len(mixed), func(i, j int) { + mixed[i], mixed[j] = mixed[j], mixed[i] + }) + + // We actually got a permuted list out of this. + require.NotEqual(t, stringify(inputs), stringify(mixed)) + + sort.Slice(mixed, func(i, j int) bool { + return LessReference(mixed[i], mixed[j]) + }) + + // And it sorted. + require.Equal(t, stringify(inputs), stringify(mixed)) + } + +} + +type sortedReferences []*pbresource.Reference + +func (r sortedReferences) Len() int { + return len(r) +} + +func (r sortedReferences) Less(i, j int) bool { + return LessReference(r[i], r[j]) +} + +func (r sortedReferences) Swap(i, j int) { + r[i], r[j] = r[j], r[i] +} + +func protoClone[T proto.Message](v T) T { + return proto.Clone(v).(T) +} + +func protoSliceClone[T proto.Message](in []T) []T { + if in == nil { + return nil + } + out := make([]T, 0, len(in)) + for _, v := range in { + out = append(out, protoClone[T](v)) + } + return out +} diff --git a/proto-public/pbmesh/v1alpha1/computed_routes.pb.go b/proto-public/pbmesh/v1alpha1/computed_routes.pb.go index 42ee8fa4d62af..5ee03fd7b1746 100644 --- a/proto-public/pbmesh/v1alpha1/computed_routes.pb.go +++ b/proto-public/pbmesh/v1alpha1/computed_routes.pb.go @@ -86,6 +86,9 @@ type ComputedRoutes struct { 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"` + // BoundReferences is a slice of mixed type references of resources that were + // involved in the formulation of this resource. + BoundReferences []*pbresource.Reference `protobuf:"bytes,2,rep,name=bound_references,json=boundReferences,proto3" json:"bound_references,omitempty"` } func (x *ComputedRoutes) Reset() { @@ -127,6 +130,13 @@ func (x *ComputedRoutes) GetPortedConfigs() map[string]*ComputedPortRoutes { return nil } +func (x *ComputedRoutes) GetBoundReferences() []*pbresource.Reference { + if x != nil { + return x.BoundReferences + } + return nil +} + type ComputedPortRoutes struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1069,7 +1079,7 @@ var file_pbmesh_v1alpha1_computed_routes_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x1c, 0x70, 0x62, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 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, 0xf8, 0x01, 0x0a, 0x0e, 0x43, + 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x02, 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, @@ -1077,251 +1087,256 @@ var file_pbmesh_v1alpha1_computed_routes_proto_rawDesc = []byte{ 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, 0x3a, 0x06, 0xa2, - 0x93, 0x04, 0x02, 0x08, 0x03, 0x22, 0x8e, 0x05, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, - 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x04, - 0x68, 0x74, 0x74, 0x70, 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, 0x6d, 0x65, - 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, - 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x47, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 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, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, - 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x44, - 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x4f, 0x0a, 0x10, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 0x0f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 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, 0x3a, 0x06, + 0xa2, 0x93, 0x04, 0x02, 0x08, 0x03, 0x22, 0x8e, 0x05, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x47, 0x0a, + 0x04, 0x68, 0x74, 0x74, 0x70, 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, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x75, 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, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x72, 0x65, 0x66, 0x18, 0x05, 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, 0x47, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 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, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, - 0x59, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x07, 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, 0x66, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, - 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x05, 0x72, - 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 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, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, - 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xa2, - 0x03, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x59, 0x0a, - 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x03, 0x20, - 0x03, 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, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0xa2, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x66, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, - 0x75, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4b, 0x0a, - 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x68, + 0x70, 0x75, 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, + 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x47, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 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, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x47, 0x52, + 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, + 0x44, 0x0a, 0x03, 0x74, 0x63, 0x70, 0x18, 0x03, 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, - 0x6d, 0x70, 0x75, 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, 0x01, 0x10, 0x02, - 0x22, 0xa2, 0x03, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, + 0x6d, 0x70, 0x75, 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, 0x4e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x05, 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, 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, - 0x59, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, - 0x03, 0x20, 0x03, 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, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, + 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, 0x47, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 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, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x12, 0x59, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x07, 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, 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, + 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, 0x66, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x75, + 0x74, 0x65, 0x64, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4b, 0x0a, 0x05, + 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 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, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, + 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, + 0xa2, 0x03, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x52, 0x65, 0x74, 0x72, 0x69, 0x65, 0x73, 0x52, 0x07, 0x72, 0x65, - 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x5e, 0x0a, 0x10, 0x43, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4a, - 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 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, 0x59, + 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, 0x18, 0x03, + 0x20, 0x03, 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, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0xa2, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x66, 0x0a, 0x11, 0x43, 0x6f, 0x6d, + 0x70, 0x75, 0x74, 0x65, 0x64, 0x47, 0x52, 0x50, 0x43, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x4b, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 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, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x70, 0x0a, 0x14, 0x43, 0x6f, - 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x75, - 0x6c, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, - 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 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, 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, 0x56, 0x0a, 0x15, - 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x05, 0x0a, 0x14, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, - 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x4c, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x68, 0x61, + 0x6f, 0x6d, 0x70, 0x75, 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, 0x01, 0x10, + 0x02, 0x22, 0xa2, 0x03, 0x0a, 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x59, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x73, + 0x18, 0x03, 0x20, 0x03, 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, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x42, 0x61, 0x63, - 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x62, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 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, 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, 0x1b, - 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x5f, 0x0a, 0x0f, 0x66, - 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, + 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, 0xa2, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x70, 0x75, + 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, 0x5e, 0x0a, 0x10, 0x43, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, + 0x4a, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 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, + 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, + 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x70, 0x0a, 0x14, 0x43, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x75, 0x6c, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, + 0x65, 0x66, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 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, 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, 0x56, 0x0a, + 0x15, 0x43, 0x6f, 0x6d, 0x70, 0x75, 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, 0x05, 0x0a, 0x14, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x4c, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 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, 0x42, 0x61, + 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x51, 0x0a, 0x0b, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x5f, 0x72, 0x65, 0x66, 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, 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, + 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x68, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x5f, 0x0a, 0x0f, + 0x66, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 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, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x46, + 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x66, + 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, + 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 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, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x64, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, + 0x4f, 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 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, 0x49, 0x44, 0x52, 0x12, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x49, 0x64, + 0x12, 0x60, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 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, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x49, 0x0a, 0x0d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x72, + 0x65, 0x66, 0x73, 0x18, 0x17, 0x20, 0x03, 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, + 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x66, 0x73, 0x4a, 0x04, 0x08, + 0x06, 0x10, 0x15, 0x22, 0xff, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, + 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, + 0x0a, 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, 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, 0x46, 0x61, - 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x66, 0x61, - 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x12, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 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, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x64, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4f, - 0x0a, 0x14, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 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, 0x49, 0x44, 0x52, 0x12, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x49, 0x64, 0x12, - 0x60, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 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, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x52, - 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x12, 0x49, 0x0a, 0x0d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x72, 0x65, - 0x66, 0x73, 0x18, 0x17, 0x20, 0x03, 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, 0x0c, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x66, 0x73, 0x4a, 0x04, 0x08, 0x06, - 0x10, 0x15, 0x22, 0xff, 0x01, 0x0a, 0x16, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x46, - 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, - 0x0c, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3b, 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, 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, 0x44, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, - 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 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, 0x2a, 0x99, 0x01, 0x0a, 0x18, 0x42, - 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x41, 0x43, 0x4b, 0x45, - 0x4e, 0x44, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, - 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, - 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x44, - 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x44, 0x49, - 0x52, 0x45, 0x43, 0x54, 0x10, 0x02, 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, + 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, 0x44, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, + 0x64, 0x46, 0x61, 0x69, 0x6c, 0x6f, 0x76, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 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, 0x2a, 0x99, 0x01, 0x0a, 0x18, + 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x44, 0x65, 0x74, + 0x61, 0x69, 0x6c, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x41, 0x43, 0x4b, + 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, + 0x4c, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, 0x0a, 0x22, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, + 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x01, 0x12, 0x28, 0x0a, + 0x24, 0x42, 0x41, 0x43, 0x4b, 0x45, 0x4e, 0x44, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, + 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x44, + 0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x02, 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, 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, + 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 ( @@ -1356,61 +1371,62 @@ var file_pbmesh_v1alpha1_computed_routes_proto_goTypes = []interface{}{ (*ComputedFailoverDestination)(nil), // 14: hashicorp.consul.mesh.v1alpha1.ComputedFailoverDestination nil, // 15: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry nil, // 16: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry - (*ParentReference)(nil), // 17: hashicorp.consul.mesh.v1alpha1.ParentReference - (v1alpha1.Protocol)(0), // 18: hashicorp.consul.catalog.v1alpha1.Protocol - (*HTTPRouteMatch)(nil), // 19: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch - (*HTTPRouteFilter)(nil), // 20: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - (*HTTPRouteTimeouts)(nil), // 21: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - (*HTTPRouteRetries)(nil), // 22: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - (*GRPCRouteMatch)(nil), // 23: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch - (*GRPCRouteFilter)(nil), // 24: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - (*BackendReference)(nil), // 25: hashicorp.consul.mesh.v1alpha1.BackendReference - (*DestinationConfig)(nil), // 26: hashicorp.consul.mesh.v1alpha1.DestinationConfig - (*pbresource.ID)(nil), // 27: hashicorp.consul.resource.ID - (*v1alpha1.ServiceEndpoints)(nil), // 28: hashicorp.consul.catalog.v1alpha1.ServiceEndpoints - (*pbresource.Reference)(nil), // 29: hashicorp.consul.resource.Reference + (*pbresource.Reference)(nil), // 17: hashicorp.consul.resource.Reference + (*ParentReference)(nil), // 18: hashicorp.consul.mesh.v1alpha1.ParentReference + (v1alpha1.Protocol)(0), // 19: hashicorp.consul.catalog.v1alpha1.Protocol + (*HTTPRouteMatch)(nil), // 20: hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch + (*HTTPRouteFilter)(nil), // 21: hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + (*HTTPRouteTimeouts)(nil), // 22: hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + (*HTTPRouteRetries)(nil), // 23: hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + (*GRPCRouteMatch)(nil), // 24: hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch + (*GRPCRouteFilter)(nil), // 25: hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + (*BackendReference)(nil), // 26: hashicorp.consul.mesh.v1alpha1.BackendReference + (*DestinationConfig)(nil), // 27: hashicorp.consul.mesh.v1alpha1.DestinationConfig + (*pbresource.ID)(nil), // 28: hashicorp.consul.resource.ID + (*v1alpha1.ServiceEndpoints)(nil), // 29: hashicorp.consul.catalog.v1alpha1.ServiceEndpoints (v1alpha1.FailoverMode)(0), // 30: hashicorp.consul.catalog.v1alpha1.FailoverMode } var file_pbmesh_v1alpha1_computed_routes_proto_depIdxs = []int32{ 15, // 0: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.ported_configs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry - 3, // 1: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.http:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedHTTPRoute - 6, // 2: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.grpc:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedGRPCRoute - 9, // 3: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.tcp:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedTCPRoute - 17, // 4: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.parent_ref:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference - 18, // 5: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.protocol:type_name -> hashicorp.consul.catalog.v1alpha1.Protocol - 16, // 6: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.targets:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry - 4, // 7: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule - 19, // 8: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch - 20, // 9: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - 5, // 10: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedHTTPBackendRef - 21, // 11: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - 22, // 12: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - 20, // 13: hashicorp.consul.mesh.v1alpha1.ComputedHTTPBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter - 7, // 14: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule - 23, // 15: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch - 24, // 16: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - 8, // 17: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedGRPCBackendRef - 21, // 18: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts - 22, // 19: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries - 24, // 20: hashicorp.consul.mesh.v1alpha1.ComputedGRPCBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter - 10, // 21: hashicorp.consul.mesh.v1alpha1.ComputedTCPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedTCPRouteRule - 11, // 22: hashicorp.consul.mesh.v1alpha1.ComputedTCPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedTCPBackendRef - 0, // 23: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.type:type_name -> hashicorp.consul.mesh.v1alpha1.BackendTargetDetailsType - 25, // 24: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference - 13, // 25: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.failover_config:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedFailoverConfig - 26, // 26: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.destination_config:type_name -> hashicorp.consul.mesh.v1alpha1.DestinationConfig - 27, // 27: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.service_endpoints_id:type_name -> hashicorp.consul.resource.ID - 28, // 28: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.service_endpoints:type_name -> hashicorp.consul.catalog.v1alpha1.ServiceEndpoints - 29, // 29: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.identity_refs:type_name -> hashicorp.consul.resource.Reference - 14, // 30: hashicorp.consul.mesh.v1alpha1.ComputedFailoverConfig.destinations:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedFailoverDestination - 30, // 31: hashicorp.consul.mesh.v1alpha1.ComputedFailoverConfig.mode:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverMode - 2, // 32: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes - 12, // 33: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.BackendTargetDetails - 34, // [34:34] is the sub-list for method output_type - 34, // [34:34] is the sub-list for method input_type - 34, // [34:34] is the sub-list for extension type_name - 34, // [34:34] is the sub-list for extension extendee - 0, // [0:34] is the sub-list for field type_name + 17, // 1: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.bound_references:type_name -> hashicorp.consul.resource.Reference + 3, // 2: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.http:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedHTTPRoute + 6, // 3: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.grpc:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedGRPCRoute + 9, // 4: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.tcp:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedTCPRoute + 18, // 5: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.parent_ref:type_name -> hashicorp.consul.mesh.v1alpha1.ParentReference + 19, // 6: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.protocol:type_name -> hashicorp.consul.catalog.v1alpha1.Protocol + 16, // 7: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.targets:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry + 4, // 8: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule + 20, // 9: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteMatch + 21, // 10: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + 5, // 11: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedHTTPBackendRef + 22, // 12: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + 23, // 13: hashicorp.consul.mesh.v1alpha1.ComputedHTTPRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + 21, // 14: hashicorp.consul.mesh.v1alpha1.ComputedHTTPBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteFilter + 7, // 15: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule + 24, // 16: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.matches:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteMatch + 25, // 17: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + 8, // 18: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedGRPCBackendRef + 22, // 19: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.timeouts:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteTimeouts + 23, // 20: hashicorp.consul.mesh.v1alpha1.ComputedGRPCRouteRule.retries:type_name -> hashicorp.consul.mesh.v1alpha1.HTTPRouteRetries + 25, // 21: hashicorp.consul.mesh.v1alpha1.ComputedGRPCBackendRef.filters:type_name -> hashicorp.consul.mesh.v1alpha1.GRPCRouteFilter + 10, // 22: hashicorp.consul.mesh.v1alpha1.ComputedTCPRoute.rules:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedTCPRouteRule + 11, // 23: hashicorp.consul.mesh.v1alpha1.ComputedTCPRouteRule.backend_refs:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedTCPBackendRef + 0, // 24: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.type:type_name -> hashicorp.consul.mesh.v1alpha1.BackendTargetDetailsType + 26, // 25: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.backend_ref:type_name -> hashicorp.consul.mesh.v1alpha1.BackendReference + 13, // 26: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.failover_config:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedFailoverConfig + 27, // 27: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.destination_config:type_name -> hashicorp.consul.mesh.v1alpha1.DestinationConfig + 28, // 28: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.service_endpoints_id:type_name -> hashicorp.consul.resource.ID + 29, // 29: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.service_endpoints:type_name -> hashicorp.consul.catalog.v1alpha1.ServiceEndpoints + 17, // 30: hashicorp.consul.mesh.v1alpha1.BackendTargetDetails.identity_refs:type_name -> hashicorp.consul.resource.Reference + 14, // 31: hashicorp.consul.mesh.v1alpha1.ComputedFailoverConfig.destinations:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedFailoverDestination + 30, // 32: hashicorp.consul.mesh.v1alpha1.ComputedFailoverConfig.mode:type_name -> hashicorp.consul.catalog.v1alpha1.FailoverMode + 2, // 33: hashicorp.consul.mesh.v1alpha1.ComputedRoutes.PortedConfigsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes + 12, // 34: hashicorp.consul.mesh.v1alpha1.ComputedPortRoutes.TargetsEntry.value:type_name -> hashicorp.consul.mesh.v1alpha1.BackendTargetDetails + 35, // [35:35] is the sub-list for method output_type + 35, // [35:35] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_pbmesh_v1alpha1_computed_routes_proto_init() } diff --git a/proto-public/pbmesh/v1alpha1/computed_routes.proto b/proto-public/pbmesh/v1alpha1/computed_routes.proto index e29782d820e87..cec52a3069c75 100644 --- a/proto-public/pbmesh/v1alpha1/computed_routes.proto +++ b/proto-public/pbmesh/v1alpha1/computed_routes.proto @@ -22,6 +22,10 @@ message ComputedRoutes { option (hashicorp.consul.resource.spec) = {scope: SCOPE_NAMESPACE}; map ported_configs = 1; + + // BoundReferences is a slice of mixed type references of resources that were + // involved in the formulation of this resource. + repeated hashicorp.consul.resource.Reference bound_references = 2; } message ComputedPortRoutes {