Documentation ¶
Index ¶
- Variables
- func Event() chan *InsConf
- func HBaseEvent() chan *HBaseInsConf
- func Init() (err error)
- func LoadCanal() (err error)
- func TiDBEvent() chan *TiDBInsConf
- type Addition
- type CTable
- type CanalConfig
- type Config
- type Database
- type HBaseDatabase
- type HBaseInsConf
- type HBaseTable
- type InsConf
- type MasterInfoConfig
- type Monitor
- type TiDBInsConf
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConfClient get config client ConfClient *conf.Client // Conf canal config variable Conf = &Config{} )
Functions ¶
Types ¶
type Addition ¶
type Addition struct { PrimaryKey []string `toml:"primarykey"` // kafka msg key OmitField []string `toml:"omitfield"` // field will be ignored in table }
Addition addition attrbute of canal.
type CTable ¶
type CTable struct { PrimaryKey []string `toml:"primarykey"` // kafka msg key OmitField []string `toml:"omitfield"` // field will be ignored in table OmitAction []string `toml:"omitaction"` // action will be ignored in table Name string `toml:"name"` // table name support regular expression Tables []string }
CTable canal table.
type CanalConfig ¶
type CanalConfig struct { Instances []*InsConf `toml:"instance"` HBaseInstances []*HBaseInsConf `toml:"hbase_instance"` TiDBInstances []*TiDBInsConf `toml:"tidb_instance"` }
CanalConfig config struct
func LoadCanalConf ¶
func LoadCanalConf() (c *CanalConfig, err error)
LoadCanalConf load canal config.
type Config ¶
type Config struct { Monitor *Monitor // xlog Log *log.Config // http client HTTPClient *bm.ClientConfig // http server BM *bm.ServerConfig // master info MasterInfo *MasterInfoConfig // discovery Discovery *discovery.Config // db DB *sql.Config }
Config canal config struct
type Database ¶
type Database struct { Schema string `toml:"schema"` Databus *databus.Config `toml:"databus"` Infoc *infoc.Config `toml:"infoc"` CTables []*CTable `toml:"table"` TableMap map[string]*Addition }
Database represent mysql db
func (*Database) CheckTable ¶
CheckTable check database tables.
type HBaseDatabase ¶
type HBaseDatabase struct { Tables []*HBaseTable `toml:"table"` Databus *databus.Config `toml:"databus"` }
HBaseDatabase hbase database.
type HBaseInsConf ¶
type HBaseInsConf struct { Cluster string Root string Addrs []string MonitorPeriod xtime.Duration `toml:"monitor_period"` MonitorOff bool `toml:"monitor_off"` Databases []*HBaseDatabase `toml:"db"` MasterInfo *MasterInfoConfig `toml:"masterinfo"` }
HBaseInsConf hbase instance config.
type HBaseTable ¶
type HBaseTable struct { Name string `toml:"name"` // table name OmitField []string `toml:"omitfield"` // field will be ignored in table }
HBaseTable hbase canal table.
type InsConf ¶
type InsConf struct { *canal.Config MonitorPeriod xtime.Duration `toml:"monitor_period"` MonitorOff bool `toml:"monitor_off"` Databases []*Database `toml:"db"` MasterInfo *MasterInfoConfig `toml:"masterinfo"` }
InsConf instance config
type MasterInfoConfig ¶
type MasterInfoConfig struct { Addr string `toml:"addr"` DBName string `toml:"dbName"` User string `toml:"user"` Password string `toml:"password"` Timeout time.Duration `toml:"timeout"` }
MasterInfoConfig save pos of binlog in file or db
Click to show internal directories.
Click to hide internal directories.