Documentation ¶
Index ¶
- type MySQLChange
- type MySQLDriver
- func (db *MySQLDriver) Close() error
- func (db *MySQLDriver) CommitInTrans(readGroup string, event *dbevent.Event, handler func() error) error
- func (db *MySQLDriver) Create(events ...*dbevent.Event) error
- func (db *MySQLDriver) Fetch(readGroup string, limit int) ([]*dbevent.Event, error)
- func (db *MySQLDriver) Provision() error
- func (db *MySQLDriver) WaitChange(timeout time.Duration)
- type MySQLStoreConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLChange ¶
type MySQLChange struct { canal.DummyEventHandler // contains filtered or unexported fields }
MySQLChange represents event change listener
func NewMySQLChange ¶
func NewMySQLChange(config *dbevent.DBConfig, tableName string) *MySQLChange
NewMySQLChange creates new instance
func (*MySQLChange) OnRow ¶
func (h *MySQLChange) OnRow(e *canal.RowsEvent) error
OnRow receives change event
func (*MySQLChange) String ¶
func (h *MySQLChange) String() string
func (*MySQLChange) WaitChange ¶
func (h *MySQLChange) WaitChange(timeout time.Duration)
WaitChange waits for change
type MySQLDriver ¶
type MySQLDriver struct {
// contains filtered or unexported fields
}
MySQLDriver represents event database
func NewMySQLEventDriver ¶
func NewMySQLEventDriver(dbConfig *dbevent.DBConfig, config *MySQLStoreConfig) *MySQLDriver
NewMySQLEventDriver creates new instance
func (*MySQLDriver) CommitInTrans ¶
func (db *MySQLDriver) CommitInTrans(readGroup string, event *dbevent.Event, handler func() error) error
CommitEvent as processed
func (*MySQLDriver) Create ¶
func (db *MySQLDriver) Create(events ...*dbevent.Event) error
Create event into database
func (*MySQLDriver) Fetch ¶
func (db *MySQLDriver) Fetch(readGroup string, limit int) ([]*dbevent.Event, error)
Fetch events from database
func (*MySQLDriver) Provision ¶
func (db *MySQLDriver) Provision() error
Provision prepares event tables
func (*MySQLDriver) WaitChange ¶
func (db *MySQLDriver) WaitChange(timeout time.Duration)
WaitChange waits for event change
type MySQLStoreConfig ¶
MySQLStoreConfig represents sql store configuration
Click to show internal directories.
Click to hide internal directories.