config

package
v0.0.0-...-55a09e9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ReleemAgentVersion = "1.20.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"`
	MetricsPeriod                         time.Duration `hcl:"interval_seconds"`
	ReadConfigPeriod                      time.Duration `hcl:"interval_read_config_seconds"`
	GenerateConfigPeriod                  time.Duration `hcl:"interval_generate_config_seconds"`
	QueryOptimizationPeriod               time.Duration `hcl:"interval_query_optimization_seconds"`
	QueryOptimizationCollectSqlTextPeriod time.Duration `hcl:"interval_query_optimization_collect_sqltext_seconds"`
	MysqlPassword                         string        `hcl:"mysql_password" json:"-"`
	MysqlUser                             string        `hcl:"mysql_user"`
	MysqlHost                             string        `hcl:"mysql_host"`
	MysqlPort                             string        `hcl:"mysql_port"`
	MysqlSslMode                          bool          `hcl:"mysql_ssl_mode"`
	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"`
	AwsRDSParameterGroup                  string        `hcl:"aws_rds_parameter_group"`
	QueryOptimization                     bool          `hcl:"query_optimization"`
	DatabasesQueryOptimization            string        `hcl:"databases_query_optimization"`
}

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