dd0e8eec14
* copyright headers for agent folder * Ignore test data files * fix proto files and remove headers in agent/uiserver folder * ignore deep-copy files
27 lines
593 B
Go
27 lines
593 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package hcp
|
|
|
|
import (
|
|
"github.com/hashicorp/consul/agent/hcp/config"
|
|
"github.com/hashicorp/consul/agent/hcp/scada"
|
|
"github.com/hashicorp/go-hclog"
|
|
)
|
|
|
|
// Deps contains the interfaces that the rest of Consul core depends on for HCP integration.
|
|
type Deps struct {
|
|
Client Client
|
|
Provider scada.Provider
|
|
}
|
|
|
|
func NewDeps(cfg config.CloudConfig, logger hclog.Logger) (d Deps, err error) {
|
|
d.Client, err = NewClient(cfg)
|
|
if err != nil {
|
|
return
|
|
}
|
|
|
|
d.Provider, err = scada.New(cfg, logger.Named("hcp.scada"))
|
|
return
|
|
}
|