Documentation ¶
Index ¶
- Constants
- Variables
- func AddDatabaseConfig(value MySQLDB, configs map[string]string)
- func CastType(value, valueType string) interface{}
- func ConfigLocalFileSystemLogger(logPath string, logFileName string, maxAge time.Duration, ...)
- func GetAllDatabaseConfigs() map[string]string
- func GetMonitoringExpression() string
- func HasBOM(in []byte) bool
- func InitConfig(files string)
- func StripBOM(in []byte) []byte
- type MySQLDB
- type MySQLDSN
- type SenderConfig
Constants ¶
View Source
const ( APIType500 = "500" APIType50x = "50x" APITypeTimeout = "timeout" APITypeAssertFailed = "assert" )
View Source
const ( AllowAccessEndpointType = 1 LimitAccessEndpointType = 0 )
Variables ¶
View Source
var Config = struct { Name string `default:"api-monitor"` MonitorName string `default:"api-monitor"` IsDebug bool MonitoringExpression string APIMonitorEnabled bool `default:"true"` PingAPIMonitorEnabled bool GlobalDatabase MySQLDB APIConfigDatabase MySQLDB APIConfigDatabaseTablePrefix string Timeout struct { Timeout time.Duration `default:"15"` TLSHandshakeTimeout time.Duration `default:"15"` ResponseHeaderTimeout time.Duration `default:"15"` ExpectContinueTimeout time.Duration `default:"1"` } SourceFormat struct { Ping string `default:"mysql"` API string `default:"mysql"` Endpoint string `default:"mysql"` } SenderConfig SenderConfig }{}
config
View Source
var UTF8BOM = []byte{239, 187, 191}
Functions ¶
func AddDatabaseConfig ¶
add database config
func ConfigLocalFileSystemLogger ¶
func ConfigLocalFileSystemLogger(logPath string, logFileName string, maxAge time.Duration, rotationTime time.Duration)
custom logs
func GetAllDatabaseConfigs ¶
get all database configs
Types ¶
Click to show internal directories.
Click to hide internal directories.