Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserClosed represents the slave is closed by user ErrUserClosed = errors.New("User closed") )
Functions ¶
This section is empty.
Types ¶
type MasterStatus ¶
type MasterStatus struct { Version string `json:"version"` Pos mconn.ReplicationPoint `json:"position"` }
MasterStatus is status of master
type Slave ¶
type Slave struct {
// contains filtered or unexported fields
}
Slave represents a slave node like a mysql slave to participate the mysql replication
func NewSlave ¶
func NewSlave(dss []mconn.DataSource, rc *mconn.ReplicationConfig, srule rule.ISyncRule) *Slave
NewSlave creates a new slave
func (*Slave) GetDataSource ¶
func (s *Slave) GetDataSource() *mconn.DataSource
GetDataSource get the current data source used by replication replication
func (*Slave) GetDataSourceIndex ¶
GetDataSourceIndex get the current data source index used by replication replication
Click to show internal directories.
Click to hide internal directories.