Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultTimeout default max cli execution time DefaultTimeout = 5 * time.Second // seconds )
Variables ¶
View Source
var ( // MapStringToLevel trans string to logs level enum MapStringToLevel = map[string]int{ "EMERGENCY": logs.LevelEmergency, "ALERT": logs.LevelAlert, "CRITICAL": logs.LevelCritical, "ERROR": logs.LevelError, "WARNING": logs.LevelWarning, "NOTICE": logs.LevelNotice, "INFO": logs.LevelInformational, "DEBUG": logs.LevelDebug, } )
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { LogCfg *LogConfig SrvCfg *ServerConfig }
AppConfig app configurations
var AppConfigInstance *AppConfig
AppConfigInstance ...
type LogConfig ¶
type LogConfig struct { Adaptor string `json:"adaptor"` Filepath string `json:"filepath"` Level string `json:"level"` MaxSize int `json:"maxsize"` }
LogConfig is the config struct for rrframework/logs
type Message ¶
type Message struct { Text string // Delimited log line Parsed map[string]interface{} // If non-nil, contains parsed fields ReceptionTime time.Time // Time log line was received SourceIP string // Sender's IP address }
Message is a log message, with a reception timestamp and sequence number.
Click to show internal directories.
Click to hide internal directories.