Skip to content

Commit

Permalink
NET-6771 - Adding sameness group protobuff in consul CE (#19883)
Browse files Browse the repository at this point in the history
 Adding sameness group protobuff in consul CE
  • Loading branch information
tauhid621 authored Dec 12, 2023
1 parent c5cce63 commit 1484c6d
Show file tree
Hide file tree
Showing 9 changed files with 444 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/multicluster/exports.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var (
// to the given type registry
func RegisterTypes(r resource.Registry) {
types.Register(r)
types.RegisterEnterprise(r)
}

// RegisterControllers registers controllers for the multicluster types with
Expand Down
2 changes: 2 additions & 0 deletions internal/multicluster/internal/types/decoded.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ type (
DecodedExportedServices = resource.DecodedResource[*pbmulticluster.ExportedServices]
DecodedNamespaceExportedServices = resource.DecodedResource[*pbmulticluster.NamespaceExportedServices]
DecodedPartitionExportedServices = resource.DecodedResource[*pbmulticluster.PartitionExportedServices]

DecodedSamenessGroup = resource.DecodedResource[*pbmulticluster.SamenessGroup]
)
11 changes: 11 additions & 0 deletions internal/multicluster/internal/types/types_ce.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

//go:build !consulent

package types

import "github.com/hashicorp/consul/internal/resource"

func RegisterEnterprise(r resource.Registry) {
}
7 changes: 7 additions & 0 deletions proto-public/pbmulticluster/v2beta1/resource_types.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions proto-public/pbmulticluster/v2beta1/sameness_group.pb.binary.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

292 changes: 292 additions & 0 deletions proto-public/pbmulticluster/v2beta1/sameness_group.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions proto-public/pbmulticluster/v2beta1/sameness_group.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

syntax = "proto3";

package hashicorp.consul.multicluster.v2beta1;

import "pbresource/annotations.proto";

message SamenessGroup {
option (hashicorp.consul.resource.spec) = {scope: SCOPE_PARTITION};

bool default_for_failover = 1;
repeated SamenessGroupMember members = 2;
}

message SamenessGroupMember {
oneof member {
string peer = 1;
string partition = 2;
}
}
Loading

0 comments on commit 1484c6d

Please sign in to comment.