Documentation ¶
Index ¶
- func GetMysqlTableColumns(schema string, table string) (columns []string, metaFromMaster bool, err error)
- func InitBinLogCenter(binlogCenter *BinLogCenterInfo) error
- func InitManageDb(dbHost string, dbPort int, dbUser, dbPass string, dbDatabase string, ...) (err error)
- func SaveReplicationPos(ctx context.Context, instanceName string, binlogPos uint32, ...) (err error)
- func UpdateMysqlTableColumns(schema, table string) error
- type BinLogCenterInfo
- type DDLEvent
- type MysqlTableMeta
- type TableBinlogInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMysqlTableColumns ¶
func InitBinLogCenter ¶
func InitBinLogCenter(binlogCenter *BinLogCenterInfo) error
func InitManageDb ¶
func SaveReplicationPos ¶
func UpdateMysqlTableColumns ¶
Types ¶
type BinLogCenterInfo ¶
type BinLogCenterInfo struct { Id int64 `json:"id"` InstanceName string `json:"instance_name"` BinlogPos uint32 `json:"binlog_pos"` BinlogGtid string `json:"binlog_gtid"` BinlogFile string `json:"binlog_file"` MetaData map[string]map[string][]string `json:"meta_data"` }
func GetReplicationPos ¶
func GetReplicationPos(ctx context.Context, instanceName string) (*BinLogCenterInfo, error)
type DDLEvent ¶
type DDLEvent struct { Schema string `json:"schema"` Table string `json:"table"` Type string `json:"type"` }
func ParseDDLStmt ¶
type MysqlTableMeta ¶
type MysqlTableMeta struct { TableSchema string `db:"table_schema" json:"table_schema"` TableName string `db:"table_name" json:"table_name"` Column_name string `db:"column_name" json:"column_name"` }
func GetMysqlMeta ¶
func GetMysqlMeta(schema string, table string) ([]MysqlTableMeta, error)
type TableBinlogInfo ¶
type TableBinlogInfo struct { Id int64 `db:"id" json:"id"` InstanceName string `db:"instance_name" json:"instance_name"` BinlogPos uint32 `db:"binlog_pos" json:"binlog_pos"` BinlogGtid string `db:"binlog_gtid" json:"binlog_gtid"` BinlogFile string `db:"binlog_file" json:"binlog_file"` MetaData string `db:"meta_data" json:"meta_data"` }
Click to show internal directories.
Click to hide internal directories.