scada

package
v0.0.0-...-8334ec8 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MPL-2.0 Imports: 9 Imported by: 90

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtlasConfig

type AtlasConfig struct {
	// Endpoint is the SCADA endpoint used for Atlas integration. If empty, the
	// defaults from the provider are used.
	Endpoint string `mapstructure:"endpoint"`

	// The name of the infrastructure we belong to, e.g. "hashicorp/prod"
	Infrastructure string `mapstructure:"infrastructure"`

	// The Atlas authentication token
	Token string `mapstructure:"token" json:"-"`
}

type Config

type Config struct {
	// The service name to use
	Service string

	// The version of the service
	Version string

	// The type of resource we represent
	ResourceType string

	// Metadata to send to along with the service information
	Meta map[string]string

	// If set, TLS certificate verification will be skipped. The value of the
	// SCADA_INSECURE environment variable will be considered if this is false.
	// If using SCADA_INSECURE, any non-empty value will trigger insecure mode.
	Insecure bool

	// Holds Atlas configuration
	Atlas AtlasConfig
}

Config holds the high-level information used to instantiate a SCADA provider and listener

type Provider

type Provider struct {
	*sc.Provider
}

Provider wraps scada-client.Provider to allow most applications to only pull in this package

func NewHTTPProvider

func NewHTTPProvider(c *Config, logOutput io.Writer) (*Provider, net.Listener, error)

NewProvider creates a new SCADA provider using the given configuration. Requests for the HTTP capability are passed off to the listener that is returned.

Jump to

Keyboard shortcuts

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