config

package
v0.0.0-...-bd520fb Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFilePath string

ConfigFilePath indicates runtime configuration file path

View Source
var DEFAULT_CONFIG_PATH = "/etc/apulisedge/config/config.yaml"
View Source
var DEFAULT_DATABASE_DIR = "/var/lib/apulisedge/db"
View Source
var DEFAULT_DATABASE_NAME = "ApulisAgent"
View Source
var DEFAULT_LOG_FILE = "agent.log"
View Source
var DEFAULT_LOG_PATH = "/var/log/apulisedge"
View Source
var SQLITE_DB_FILE_NAME = "agent.db"

Functions

func InitConfig

func InitConfig()

Types

type AgentConfigType

type AgentConfigType struct {
	Log      LogConfig      `yaml:"log"`
	Database DatabaseConfig `yaml:"database"`
	Server   ServerConfig   `yaml:"server"`
	Modules  Modules
}

AgentConfigType indicates configuration structure

var AppConfig AgentConfigType

AppConfig indicates runtime configuration

type DatabaseConfig

type DatabaseConfig struct {
	Dir      string `yaml:"dir"`
	Type     string `yaml:"type"`
	Address  string `yaml:"address"`
	Port     int    `yaml:"port"`
	UserName string `yaml:"username"`
	Password string `yaml:"password"`
}

type LogConfig

type LogConfig struct {
	Path     string `yaml:"path"`
	FileName string `yaml:"filename"`
}

LogConfig indicates log configuration structure

type Modules

type Modules struct {
	Logger    *loggers.LoggerConfigType
	WssClient *wssclient.WssClientContext
}

type ServerConfig

type ServerConfig struct {
	Address string `yaml:"address"`
	Port    int    `yaml:"port"`
}

Jump to

Keyboard shortcuts

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