2024-02-20 20:42:31 +00:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
|
|
|
|
//go:build !consulent
|
|
|
|
|
|
|
|
package testing
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hashicorp/go-hclog"
|
|
|
|
|
|
|
|
svc "github.com/hashicorp/consul/agent/grpc-external/services/resource"
|
|
|
|
"github.com/hashicorp/consul/internal/resource"
|
|
|
|
"github.com/hashicorp/consul/proto-public/pbresource"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Builder struct {
|
2024-09-05 14:50:46 +00:00
|
|
|
registry resource.Registry
|
|
|
|
registerFns []func(resource.Registry)
|
|
|
|
tenancies []*pbresource.Tenancy
|
|
|
|
aclResolver svc.ACLResolver
|
|
|
|
serviceImpl *svc.Server
|
|
|
|
cloning bool
|
2024-02-20 20:42:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (b *Builder) ensureLicenseManager() {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (b *Builder) newConfig(logger hclog.Logger, backend svc.Backend, tenancyBridge resource.TenancyBridge) *svc.Config {
|
|
|
|
return &svc.Config{
|
|
|
|
Logger: logger,
|
|
|
|
Registry: b.registry,
|
|
|
|
Backend: backend,
|
|
|
|
ACLResolver: b.aclResolver,
|
|
|
|
TenancyBridge: tenancyBridge,
|
|
|
|
}
|
|
|
|
}
|