config

package
v0.0.0-...-c8f094d Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReleemAgentVersion = "1.14.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug                 bool          `hcl:"debug"`
	Env                   string        `hcl:"env"`
	Hostname              string        `hcl:"hostname"`
	ApiKey                string        `hcl:"apikey"`
	TimePeriodSeconds     time.Duration `hcl:"interval_seconds"`
	ReadConfigSeconds     time.Duration `hcl:"interval_read_config_seconds"`
	GenerateConfigSeconds time.Duration `hcl:"interval_generate_config_seconds"`
	MysqlPassword         string        `hcl:"mysql_password"`
	MysqlUser             string        `hcl:"mysql_user"`
	MysqlHost             string        `hcl:"mysql_host"`
	MysqlPort             string        `hcl:"mysql_port"`
	CommandRestartService string        `hcl:"mysql_restart_service"`
	MysqlConfDir          string        `hcl:"mysql_cnf_dir"`
	ReleemConfDir         string        `hcl:"releem_cnf_dir"`
	ReleemDir             string        `hcl:"releem_dir"`
	MemoryLimit           int           `hcl:"memory_limit"`
	InstanceType          string        `hcl:"instance_type"`
	AwsRegion             string        `hcl:"aws_region"`
	AwsRDSDB              string        `hcl:"aws_rds_db"`
}

func LoadConfig

func LoadConfig(filename string, logger logging.Logger) (*Config, error)

func LoadConfigFromString

func LoadConfigFromString(data string, logger logging.Logger) (*Config, error)

func (*Config) GetApiKey

func (config *Config) GetApiKey() string

func (*Config) GetEnv

func (config *Config) GetEnv() string

func (*Config) GetMemoryLimit

func (config *Config) GetMemoryLimit() int

func (*Config) GetReleemConfDir

func (config *Config) GetReleemConfDir() string

Jump to

Keyboard shortcuts

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