loaders

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package loaders provides an interface load target configurations into the connection manager.

Index

Constants

This section is empty.

Variables

View Source
var Registry = make(map[string]func(config *configuration.GatewayConfig) TargetLoader)

Functions

func Register added in v0.7.0

func Register(name string, new func(config *configuration.GatewayConfig) TargetLoader)

Types

type TargetLoader

type TargetLoader interface {
	// Get the Configuration once.
	GetConfiguration() (*targetpb.Configuration, error)
	// Start the loader, if necessary.
	// Start will be called once by the gateway after StartGateway is called.
	Start() error
	// Start watching the configuration for changes and send the entire
	// configuration to the supplied channel when a change is detected.
	WatchConfiguration(chan<- *connections.TargetConnectionControl) error
}

TargetLoader is an interface to load target configuration data. TargetLoader communicates with the ConnectionManager via TargetConnectionControl messages that contain targetpb.Configuration.

func New added in v0.7.0

Directories

Path Synopsis
Package netbox provides a TargetLoader for loading devices from NetBox.
Package netbox provides a TargetLoader for loading devices from NetBox.
Package simple provides a TargetLoader for parsing a simple target YAML config file.
Package simple provides a TargetLoader for parsing a simple target YAML config file.

Jump to

Keyboard shortcuts

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