Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseObserver ¶
type BaseObserver struct {
// contains filtered or unexported fields
}
BaseObserver implement the Observer GetID and SetID method
type MySQLDest ¶
type MySQLDest struct { Host string Port uint16 Username string Password string Charset string Text bool }
MySQLDest is the config show how to synchronize binlog data to destinate MySQL
type MySQLObserver ¶
type MySQLObserver struct { BaseObserver // contains filtered or unexported fields }
MySQLObserver observe binlog events and translate to SQL statement, and execute to destinate database
func NewMySQLObserver ¶
func NewMySQLObserver(dsts []MySQLDest) (*MySQLObserver, error)
NewMySQLObserver create an observer observe binlog event and synchronize to MySQL
type NotifyChain ¶
type NotifyChain struct {
// contains filtered or unexported fields
}
NotifyChain holds observers and notify them if event happened
func (*NotifyChain) AddObserver ¶
func (c *NotifyChain) AddObserver(ob Observer)
AddObserver add a observer to the chain
func (*NotifyChain) Broadcast ¶
func (c *NotifyChain) Broadcast(evt *binlog.Event) error
Broadcast notify all observer event occurs
func (*NotifyChain) RemoveObserver ¶
func (c *NotifyChain) RemoveObserver(ob Observer)
RemoveObserver remove a observer from the chain
Click to show internal directories.
Click to hide internal directories.