config

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 5 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
	Port      int
	IsDevMode bool
	// contains filtered or unexported fields
}

Config stores agent configuration params

func GetConfig

func GetConfig() (*Config, error)

GetConfig returns agent config

func (*Config) GetInt

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

GetInt returns int value by key

func (*Config) GetModuleVarAbsDir added in v0.3.0

func (c *Config) GetModuleVarAbsDir(id string) string

GetModuleVarDir returns module var directiry absolute path

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