2023-09-20 19:20:20 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
|
|
|
package tenancy
|
|
|
|
|
|
|
|
import (
|
2023-10-27 13:55:02 +00:00
|
|
|
"github.com/hashicorp/consul/internal/controller"
|
2023-09-20 19:20:20 +00:00
|
|
|
"github.com/hashicorp/consul/internal/resource"
|
2023-10-20 18:49:54 +00:00
|
|
|
"github.com/hashicorp/consul/internal/tenancy/internal/bridge"
|
2023-10-27 13:55:02 +00:00
|
|
|
"github.com/hashicorp/consul/internal/tenancy/internal/controllers"
|
2023-09-20 19:20:20 +00:00
|
|
|
"github.com/hashicorp/consul/internal/tenancy/internal/types"
|
|
|
|
)
|
|
|
|
|
2023-10-20 18:49:54 +00:00
|
|
|
type (
|
|
|
|
V2TenancyBridge = bridge.V2TenancyBridge
|
|
|
|
)
|
|
|
|
|
2023-09-20 19:20:20 +00:00
|
|
|
// RegisterTypes adds all resource types within the "tenancy" API group
|
|
|
|
// to the given type registry
|
|
|
|
func RegisterTypes(r resource.Registry) {
|
|
|
|
types.Register(r)
|
|
|
|
}
|
2023-10-20 18:49:54 +00:00
|
|
|
|
2023-10-27 13:55:02 +00:00
|
|
|
// RegisterControllers registers controllers for the tenancy types with
|
|
|
|
// the given controller manager.
|
2023-11-07 14:06:10 +00:00
|
|
|
func RegisterControllers(mgr *controller.Manager, deps Dependencies) {
|
|
|
|
controllers.Register(mgr, deps)
|
2023-10-27 13:55:02 +00:00
|
|
|
}
|
|
|
|
|
2023-10-20 18:49:54 +00:00
|
|
|
func NewV2TenancyBridge() *V2TenancyBridge {
|
|
|
|
return bridge.NewV2TenancyBridge()
|
|
|
|
}
|
2023-11-07 14:06:10 +00:00
|
|
|
|
|
|
|
type Dependencies = controllers.Dependencies
|