Documentation ¶
Index ¶
- Variables
- func GetInt(row map[string]interface{}, key string) int
- func GetString(row map[string]interface{}, key string) string
- func GetTime(row map[string]interface{}, key string) time.Time
- type BinlogHandler
- type Database
- type DispatchHandler
- type DummyBinLogHandler
- type OnRowHandler
- type Options
- type RowEventData
- type RowEventMonitor
- type TableInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var KEmptyTime = time.Date(1970, 1, 1, 8, 0, 0, 0, time.Local)
Functions ¶
Types ¶
type BinlogHandler ¶
type DispatchHandler ¶
type DispatchHandler struct { cdcstore.MysqlPosInterface canal.DummyEventHandler // contains filtered or unexported fields }
func NewDispatchHandler ¶
func NewDispatchHandler(dbs []*Database) *DispatchHandler
func (*DispatchHandler) GetGTidSet ¶
func (m *DispatchHandler) GetGTidSet() mysql.GTIDSet
func (*DispatchHandler) OnPosSynced ¶
func (m *DispatchHandler) OnPosSynced(eh *replication.EventHeader, p mysql.Position, g mysql.GTIDSet, force bool) error
func (*DispatchHandler) SetGTidSet ¶
func (m *DispatchHandler) SetGTidSet(g mysql.GTIDSet)
type DummyBinLogHandler ¶
func (*DummyBinLogHandler) GetActions ¶
func (h *DummyBinLogHandler) GetActions() []string
func (*DummyBinLogHandler) GetDbName ¶
func (h *DummyBinLogHandler) GetDbName() string
func (*DummyBinLogHandler) GetTableName ¶
func (h *DummyBinLogHandler) GetTableName() string
func (*DummyBinLogHandler) OnRow ¶
func (h *DummyBinLogHandler) OnRow(*RowEventData) error
type OnRowHandler ¶
type OnRowHandler interface { BinlogHandler OnRow(*RowEventData) error }
type Options ¶
type Options struct { Addr string `yaml:"addr"` User string `yaml:"user"` Pwd string `yaml:"pwd"` Charset string `yaml:"charset"` MaxIdleNum int `yaml:"max_idle_num"` MaxConnNum int `yaml:"max_conn_num"` DefaultDb string `yaml:"default_db"` Databases []*Database `yaml:"databases"` }
func NewDefaultOpt ¶
func NewDefaultOpt() *Options
type RowEventData ¶
type RowEventMonitor ¶
type RowEventMonitor struct {
// contains filtered or unexported fields
}
func NewRowEventMonitor ¶
func NewRowEventMonitor(opt *Options) (*RowEventMonitor, error)
func (*RowEventMonitor) AddHandler ¶
func (m *RowEventMonitor) AddHandler(handlers ...OnRowHandler) error
func (*RowEventMonitor) SetStore ¶
func (m *RowEventMonitor) SetStore(store cdcstore.MysqlPosInterface)
func (*RowEventMonitor) StartMonitor ¶
func (m *RowEventMonitor) StartMonitor() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.