config

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package Config provides functionality to read user-required fields, and build a Massh config from which to generate a StreamCycle

Index

Constants

This section is empty.

Variables

View Source
var (

	// Config keys.
	HostsCommandConfigKey     = "omni.HostsCommand"
	HostsCommandArgsConfigKey = "omni.HostsCommandArgs"

	BastionHostConfigKey            = "omni.BastionHost"
	BastionHostCommandConfigKey     = "omni.BastionHostCommand"
	BastionHostCommandArgsConfigKey = "omni.BastionHostCommandArgs"

	UsernameConfigKey            = "omni.Username"
	UsernameCommandConfigKey     = "omni.UsernameCommand"
	UsernameCommandArgsConfigKey = "omni.UserCommandArgs"

	SSHTimeoutConfigKey     = "omni.SSHTimeout"
	CommandTimeoutConfigKey = "omni.CommandTimeout"

	PrivateKeyLocConfigKey = "omni.PrivateKeyLoc"
	PrivateKeyPassword     = "omni.PrivateKeyPassword"

	ConcurrentWorkerPoolConfigKey = "omni.WorkerPool"

	// Default values where applicable
	SSHTimeoutDefault           = 10
	PrivateKeyLocDefault        = "~/.ssh/id_rsa"
	ConcurrentWorkerPoolDefault = 30

	// Custom config file location
	ConfigFileLoc = ""
)

Functions

func InitConfig

func InitConfig()

InitConfig reads in a config file, populating Viper with keys used to access values elsewhere in the tool.

func SetConfigDefaults

func SetConfigDefaults()

Types

type OmnivoreConfig

type OmnivoreConfig struct {
	Hosts              []string
	BastionHost        string
	Command            string
	Username           string
	Password           string
	SSHTimeout         int
	PrivateKeyLoc      string
	PrivateKeyPassword string
}

OmnivoreConfig contains user-provided values necessary to run the tool.

Jump to

Keyboard shortcuts

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