gpcconfig

package
v0.0.0-...-ee14c80 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteDefaultConfigFile

func WriteDefaultConfigFile(sConfigFilePath string)

WriteDefaultConfigFile writes a default configuration file to disk #########################################################

Types

type ConfigData

type ConfigData struct {
	Logging struct {
		LogsFolder      string // folder where to store logs
		LogFileSizeMB   uint32 // Max file size for log file in MB
		LogDebugEnabled bool   // Enables debug output
	}
	Tasks []ProcessConfig // The actual processes that shall be started
}

ConfigData is the in-memory representation of the configuration file

func ReadConfigFromFile

func ReadConfigFromFile(sConfigFilePath string) (tConfigData ConfigData)

ReadConfigFromFile loads a active configuration from a JSON #########################################################

type ProcessConfig

type ProcessConfig struct {
	Name                string   // Name for the process to run
	StartPath           string   // Exact path to executable
	StartArgs           []string // Arguments passed to the executable
	StartDelayS         uint32   // zero => no start delay
	MaxRestarts         uint32   // zero => do not automatically restart
	WaitForExitTimeoutS uint32   // zero => no waiting for application to end. If specified, the process will be terminated when it exeeds the timeout
	HideWindow          bool     // true hides the window, false will show it
	StopPath            string   // Exact path to executable
	StopArgs            []string // Arguments passed to the executable
}

ProcessConfig is the in-memory representation of the configuration file part of process

Jump to

Keyboard shortcuts

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