Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProcessorAPI = "api" ProcessorScript = "script" )
Variables ¶
This section is empty.
Functions ¶
func ConfigureLogger ¶
func ConfigureLogger(conf *Configuration) *logger.Logger
func LoadConfig ¶
func LoadConfig(path string, Config *Configuration) error
Types ¶
type Configuration ¶
type Configuration struct {
Logger struct {
Console struct {
PrintFile bool `yaml:"print_file"`
EnableColor bool `yaml:"enable_color"`
LogLevel int `yaml:"log_level"`
Enabled bool `yaml:"enabled"`
} `yaml:"console"`
} `yaml:"logger"`
Prometheus struct {
Enabled bool `yaml:"enabled"`
Port int `yaml:"port"`
Path string `yaml:"path"`
RecalcEstabConnsTimeout time.Duration `yaml:"recalc_estab_timeout"`
LiveRecalc bool `yaml:"live_recalc"`
Labels map[string]string `yaml:"static_labels"`
Detailed bool `yaml:"detailed"`
} `yaml:"prometheus"`
Radius struct {
ListenAddr string `yaml:"listen_addr"`
Secret string `yaml:"secret"`
// ReadBufferSize - размер SO_RCVBUF в байтах. 0 - системный default
// (обычно net.core.rmem_default, на busy-системах маловат под всплески).
ReadBufferSize int `yaml:"read_buffer_size"`
} `yaml:"radius"`
// processor: "api" (по умолчанию) или "script" - выбирает, какой из блоков ниже используется
Processor string `yaml:"processor"`
Api api.ApiConfig `yaml:"api"`
Script script.Config `yaml:"script"`
Profiler struct {
Port int `yaml:"port"`
Enabled bool `yaml:"enabled"`
} `yaml:"profiler"`
}
Click to show internal directories.
Click to hide internal directories.