Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SERVERNAME string //= "binlogbroker"
Functions ¶
func GetConfig ¶
func GetConfig(config_file string, config *ServerConfig) error
func GetConfigFromEtcd ¶
Types ¶
type AlertConfig ¶
type BrokerConfig ¶
type BrokerConfig struct { //group name from cmd line Group string `json:"-"` LogDir string LogFile string //etcd url, from cmd line EtcdAddr []string //binlog push to kafka KafkaAddr []string //admin port RPCListen string // on master/slave switched, sending message enterprise WeChat //Alert AlertConfig Alert struct { Host string Token string DepartmentId []string } }
type ServerConfig ¶
type ServerConfig struct { //etcd: /v2/keys/config/binlogbroker BrokerConfig BrokerConfig //etcd: /v2/keys/config/binlogbroker:${group}, group name from the cmd line SourceConfig SourceConfig }
var G_Config ServerConfig = ServerConfig{}
type SourceConfig ¶
type SourceConfig struct { //db conn: root:password@tcp(localhost:3306) MysqlConn string //parse from MysqlConn DBConfig struct { User string Passwd string Net string Addr string DSN string } `json:"-"` //db and table list Sources []Source //if sources config is empty and SyncAll is true,broker sync all, else do nothing SyncAll bool BlackList []string //eg:schema.table }
Click to show internal directories.
Click to hide internal directories.