Documentation
¶
Index ¶
Constants ¶
View Source
const SQL_CLASS = 0x01
View Source
const SQL_TYPE_MYSQL = 0x01
Variables ¶
This section is empty.
Functions ¶
func WriteConfigFile ¶
Types ¶
type AlertEmail ¶
type Config ¶
type Config struct { Addr string `yaml:"addr"` PrometheusAddr string `yaml:"prometheus_addr"` WebAddr string `yaml:"web_addr"` WebUser string `yaml:"web_user"` WebPassword string `yaml:"web_password"` TaskPeriod time.Duration `yaml:"task_period"` LogPath string `yaml:"log_path"` LogLevel string `yaml:"log_level"` QueueType string `yaml:"queue_type"` QueueNum int `yaml:"queue_num"` Database *DataBase `mapstructer:"database"` EsConfig *EsConfig `yaml:"es_config"` AlertType string `yaml:"alert_type"` AlertEmail *AlertEmail `yaml:"alert_email"` SlowLogTime int `yaml:"slow_log_time"` AllowIps string `yaml:"allow_ips"` BlsFile string `yaml:"blacklist_sql_file"` Charset string `yaml:"proxy_charset"` }
整个config文件对应的结构
func ParseConfigData ¶
func ParseConfigFile ¶
type SqlMsg ¶
type SqlMsg struct { Id uint `json:"id"` Name string `json:"name"` Type int `json:"type"` Transaction string `json:"transaction"` Src string `json:"src"` Dst string `json:"dst"` User string `json:"user"` Time int64 `json:"time"` Db string `json:"db"` Cmd byte `json:"cmd"` Sql string `json:"sql"` Op int `json:"op"` Alert int `json:"alert"` Error int `json:"error"` FingerPrint string `json:"fingerprint"` Rows int `json:"rows"` Status int `json:"status"` }
Click to show internal directories.
Click to hide internal directories.