-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mesh: adding the protobuf types and resources backing mesh config v2
- Loading branch information
Showing
44 changed files
with
8,688 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package types | ||
|
||
import ( | ||
"github.com/hashicorp/consul/internal/resource" | ||
pbcatalog "github.com/hashicorp/consul/proto-public/pbcatalog/v1alpha1" | ||
"github.com/hashicorp/consul/proto-public/pbresource" | ||
) | ||
|
||
const ( | ||
FailoverPolicyKind = "FailoverPolicy" | ||
) | ||
|
||
var ( | ||
FailoverPolicyV1Alpha1Type = &pbresource.Type{ | ||
Group: GroupName, | ||
GroupVersion: VersionV1Alpha1, | ||
Kind: FailoverPolicyKind, | ||
} | ||
|
||
FailoverPolicyType = FailoverPolicyV1Alpha1Type | ||
) | ||
|
||
func RegisterFailoverPolicy(r resource.Registry) { | ||
r.Register(resource.Registration{ | ||
Type: FailoverPolicyV1Alpha1Type, | ||
Proto: &pbcatalog.FailoverPolicy{}, | ||
Validate: nil, | ||
Mutate: nil, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package types | ||
|
||
import ( | ||
"github.com/hashicorp/consul/internal/resource" | ||
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" | ||
"github.com/hashicorp/consul/proto-public/pbresource" | ||
) | ||
|
||
const ( | ||
ComputedRoutesKind = "ComputedRoutes" | ||
) | ||
|
||
var ( | ||
ComputedRoutesV1Alpha1Type = &pbresource.Type{ | ||
Group: GroupName, | ||
GroupVersion: VersionV1Alpha1, | ||
Kind: ComputedRoutesKind, | ||
} | ||
|
||
ComputedRoutesType = ComputedRoutesV1Alpha1Type | ||
) | ||
|
||
func RegisterComputedRoutes(r resource.Registry) { | ||
r.Register(resource.Registration{ | ||
Type: ComputedRoutesV1Alpha1Type, | ||
Proto: &pbmesh.ComputedRoutes{}, | ||
Validate: nil, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package types | ||
|
||
import ( | ||
"github.com/hashicorp/consul/internal/resource" | ||
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" | ||
"github.com/hashicorp/consul/proto-public/pbresource" | ||
) | ||
|
||
const ( | ||
DestinationPolicyKind = "DestinationPolicy" | ||
) | ||
|
||
var ( | ||
DestinationPolicyV1Alpha1Type = &pbresource.Type{ | ||
Group: GroupName, | ||
GroupVersion: VersionV1Alpha1, | ||
Kind: DestinationPolicyKind, | ||
} | ||
|
||
DestinationPolicyType = DestinationPolicyV1Alpha1Type | ||
) | ||
|
||
func RegisterDestinationPolicy(r resource.Registry) { | ||
r.Register(resource.Registration{ | ||
Type: DestinationPolicyV1Alpha1Type, | ||
Proto: &pbmesh.DestinationPolicy{}, | ||
Validate: nil, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package types | ||
|
||
import ( | ||
"github.com/hashicorp/consul/internal/resource" | ||
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" | ||
"github.com/hashicorp/consul/proto-public/pbresource" | ||
) | ||
|
||
const ( | ||
GRPCRouteKind = "GRPCRoute" | ||
) | ||
|
||
var ( | ||
GRPCRouteV1Alpha1Type = &pbresource.Type{ | ||
Group: GroupName, | ||
GroupVersion: VersionV1Alpha1, | ||
Kind: GRPCRouteKind, | ||
} | ||
|
||
GRPCRouteType = GRPCRouteV1Alpha1Type | ||
) | ||
|
||
func RegisterGRPCRoute(r resource.Registry) { | ||
r.Register(resource.Registration{ | ||
Type: GRPCRouteV1Alpha1Type, | ||
Proto: &pbmesh.GRPCRoute{}, | ||
Validate: nil, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package types | ||
|
||
import ( | ||
"github.com/hashicorp/consul/internal/resource" | ||
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" | ||
"github.com/hashicorp/consul/proto-public/pbresource" | ||
) | ||
|
||
const ( | ||
HTTPRouteKind = "HTTPRoute" | ||
) | ||
|
||
var ( | ||
HTTPRouteV1Alpha1Type = &pbresource.Type{ | ||
Group: GroupName, | ||
GroupVersion: VersionV1Alpha1, | ||
Kind: HTTPRouteKind, | ||
} | ||
|
||
HTTPRouteType = HTTPRouteV1Alpha1Type | ||
) | ||
|
||
func RegisterHTTPRoute(r resource.Registry) { | ||
r.Register(resource.Registration{ | ||
Type: HTTPRouteV1Alpha1Type, | ||
Proto: &pbmesh.HTTPRoute{}, | ||
Validate: nil, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package types | ||
|
||
import ( | ||
"github.com/hashicorp/consul/internal/resource" | ||
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1" | ||
"github.com/hashicorp/consul/proto-public/pbresource" | ||
) | ||
|
||
const ( | ||
TCPRouteKind = "TCPRoute" | ||
) | ||
|
||
var ( | ||
TCPRouteV1Alpha1Type = &pbresource.Type{ | ||
Group: GroupName, | ||
GroupVersion: VersionV1Alpha1, | ||
Kind: TCPRouteKind, | ||
} | ||
|
||
TCPRouteType = TCPRouteV1Alpha1Type | ||
) | ||
|
||
func RegisterTCPRoute(r resource.Registry) { | ||
r.Register(resource.Registration{ | ||
Type: TCPRouteV1Alpha1Type, | ||
Proto: &pbmesh.TCPRoute{}, | ||
Validate: nil, | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
proto-public/pbcatalog/v1alpha1/failover_policy.pb.binary.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.