Documentation ¶
Index ¶
- type Config
- type MasterConfig
- func (mc *MasterConfig) GetMaster() MasterInfo
- func (mc *MasterConfig) GetMasterUnit() (bool, bool, uint16)
- func (mc *MasterConfig) SetMaster(masterAddr, slaveAddr string) error
- func (mc *MasterConfig) SetMigration(masterAddr, slaveAddr string, unitId uint16) error
- func (mc *MasterConfig) SetStatus(status int) error
- func (mc *MasterConfig) Status() int
- type MasterEncoding
- type MasterInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Db database `toml:"database"` Bin binlog `toml:"binlog"` Auth auth Profile profile }
type MasterConfig ¶
type MasterConfig struct {
// contains filtered or unexported fields
}
func NewMasterConfig ¶
func NewMasterConfig(dir string) *MasterConfig
func (*MasterConfig) GetMaster ¶
func (mc *MasterConfig) GetMaster() MasterInfo
func (*MasterConfig) GetMasterUnit ¶ added in v1.0.3
func (mc *MasterConfig) GetMasterUnit() (bool, bool, uint16)
func (*MasterConfig) SetMaster ¶
func (mc *MasterConfig) SetMaster(masterAddr, slaveAddr string) error
func (*MasterConfig) SetMigration ¶
func (mc *MasterConfig) SetMigration(masterAddr, slaveAddr string, unitId uint16) error
func (*MasterConfig) SetStatus ¶
func (mc *MasterConfig) SetStatus(status int) error
func (*MasterConfig) Status ¶
func (mc *MasterConfig) Status() int
type MasterEncoding ¶
type MasterEncoding struct { HasMaster bool // true: Has master; false: No master/No migration MasterInfo LastTime time.Time // Last change time }
Click to show internal directories.
Click to hide internal directories.