Documentation ¶
Index ¶
- Constants
- func GetEnvironment() string
- func GetLogColor() bool
- func GetLogLevel() string
- func GetLogLineSize() int
- func GetLogMaxDays() int
- func GetLogMaxSize() int64
- func GetLogPath() string
- func GetLogSuffix() string
- func GetReportLevel() string
- func GetReportLineSize() int
- func GetReportMaxDays() int
- func GetReportMaxSize() int64
- func GetReportPath() string
- func GetReportSuffix() string
- func GetSerLogFileName() string
- func GetServerId() int
- func GetServerIdStr() string
- func GetServerName() string
- func GetServerPort() int
- func GetStatChanLen() int
- func GetStatDelayUp() int
- func GetStatDelayUp2() int
- func GetStatDelayUp3() int
- func GetStatInterval() int
- func GetStatLevel() string
- func GetStatLineSize() int
- func GetStatMaxDays() int
- func GetStatMaxSize() int64
- func GetStatPath() string
- func GetStatSuffix() string
- func GetViperHandle(alias string) *viper.Viper
- func GetXmlConfigElement(alias, xpath string) ([]*etree.Element, error)
- func GetXmlConfigHandle(alias string) *etree.Document
- func GetXmlConfigInt(alias, xpath string) (int, error)
- func GetXmlConfigStr(alias string) string
- func GetXmlConfigText(alias, xpath string) (string, error)
- func GetXmlConfigTextList(alias, xpath string) ([]string, error)
- func GetXmlRootPathElement(tag string) string
- func GetZipkinLevel() string
- func GetZipkinLineSize() int
- func GetZipkinMaxDays() int
- func GetZipkinMaxSize() int64
- func GetZipkinPath() string
- func GetZipkinSuffix() string
- func InitConfigViper(name, path, confType, alias string, watcher bool) error
- func InitFrameworkConfig(path, alias string, watcher bool) error
- func InitXmlConfig(path, alias string, watcher bool) error
- func IsTest() bool
- func NewViper() *viper.Viper
Constants ¶
View Source
const (
AliasDef = "default-log" // 框架初始化时已使用
)
Variables ¶
This section is empty.
Functions ¶
func GetReportLevel ¶
func GetReportLevel() string
////////////////////////////////////// Report Level
func GetServerIdStr ¶
func GetServerIdStr() string
func GetStatInterval ¶
func GetStatInterval() int
func GetViperHandle ¶
func GetXmlConfigElement ¶
获取xml配置信息
func GetXmlConfigHandle ¶
获取解析xml文件的句柄 alias: 解析多个xml文件时,用于区分。alias为空是,使用默认名[default]
func GetXmlConfigTextList ¶
获取xml配置信息
func GetXmlRootPathElement ¶
获取xml配置信息 获取root层级下的对象配置信息
func GetZipkinLevel ¶
func GetZipkinLevel() string
////////////////////////////////////// Zipkin Level
func InitConfigViper ¶
获取配置信息Viper name: 不需要后缀名 path: 可以是绝对路径,也可以相对路径 confType: "json", "toml", "yaml", "yml", "properties", "props", "prop", "hcl", "tfvars", "dotenv", "env", "ini" alias: 配置别名,区分多配置,必填不能为空
func InitFrameworkConfig ¶
func InitXmlConfig ¶
解析xml文件 path: xml文件路径 alias: 解析多个xml文件时,用于区分。alias为空是,使用默认名[default] watcher: 是否监控并重载文件变更
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.