Skip to content

Commit

Permalink
Register controller for MeshGateway w/ TODOs for hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman committed Nov 7, 2023
1 parent cbaddcc commit 55f8025
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions internal/mesh/internal/types/mesh_gateway.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

package types

import (
"github.com/hashicorp/consul/internal/resource"
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v2beta1"
)

func RegisterMeshGateway(r resource.Registry) {
r.Register(resource.Registration{
Type: pbmesh.MeshGatewayType,
Proto: &pbmesh.MeshGateway{},
Scope: resource.ScopeCluster,
ACLs: nil, // TODO NET-6423
Mutate: nil, // TODO NET-6425
Validate: nil, // TODO NET-6424
})
}
1 change: 1 addition & 0 deletions internal/mesh/internal/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func Register(r resource.Registry) {
RegisterGRPCRoute(r)
RegisterDestinationPolicy(r)
RegisterComputedRoutes(r)
RegisterMeshGateway(r)
// todo (v2): uncomment once we implement it.
//RegisterDestinationsConfiguration(r)
}

0 comments on commit 55f8025

Please sign in to comment.