config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogFile,
	ExecutablePath,
	ConfigPath,
	Token string
	LogLevel, Port int
	// contains filtered or unexported fields
}

Config stores agent configuration params

func GetConfig

func GetConfig() *Config

GetConfig returns agent config

func (*Config) GetInt

func (c *Config) GetInt(key string) int

GetInt returns int value by key

func (*Config) GetLoggerFileAbsPath

func (c *Config) GetLoggerFileAbsPath() string

GetLoggerFileAbsPath returns absolute path to logger file

func (*Config) GetScriptsDirAbsPath

func (c *Config) GetScriptsDirAbsPath() string

GetScriptsDirAbsPath returns absolute path to scripts directory

func (*Config) GetString

func (c *Config) GetString(key string) string

GetString returns string value by key

func (*Config) GetVarDirAbsPath

func (c *Config) GetVarDirAbsPath() string

GetVarDirAbsPath returns absolute path to var directory

func (*Config) IsSet

func (c *Config) IsSet(key string) bool

IsSet checks if key exists in config

func (*Config) Merge

func (c *Config) Merge() error

Merge merges config already loaded in memory with existing one

func (*Config) ToMap

func (c *Config) ToMap() map[string]string

ToMap returns all settings as map

Jump to

Keyboard shortcuts

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