config

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2023 License: MPL-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package config contains the configuration required for a self-managed resource to connect to HashiCorp Cloud Platform (HCP).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// NodeID is an ID that uniquely identifies the node within the Resource
	// (e.g. within the Vault cluster).
	//
	// This ID should ideally persist through restarts of the node.
	NodeID string

	// NodeVersion is the semantic versioning formatted version of the node.
	NodeVersion string

	// Resource is the Resource the Link client should identify as, the Resource
	// will have to be created on HCP before it can be provided to the library.
	Resource cloud.HashicorpCloudLocationLink

	// HCPConfig is the HCP specific configuration, it provides information
	// necessary to talk to HCP APIs.
	HCPConfig sdk.HCPConfig

	// NodeStatusReporter is used as a callback to retrieve the node's current
	// status information.
	NodeStatusReporter nodestatus.Reporter

	// SCADAProvider is a SCADA provider that is registered on HCP's SCADA broker.
	SCADAProvider scada.SCADAProvider

	// Logger is HCLog Logger instance that will be used to log debug information.
	Logger hclog.Logger
}

Config contains information about the node, the linked resource and the SCADA connection.

func (*Config) Validate

func (c *Config) Validate() error

Validate will validate the Link configuration. It ensures that the specified Resource is valid and that all fields are provided.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL