Documentation ¶
Index ¶
- func Bind_IPs(db_id int, ips string, netcard string) int
- func CheckDrConfig(bs_id int) (int, error)
- func CheckSlaveDelay(mdb *xorm.Engine, sdb *xorm.Engine) int
- func CountDrconfig(condArr map[string]string) int64
- func CountOracleDrConfig(condArr map[string]string) int64
- func FailoverIPs(op_id int64, dr_id int, asset_type int, sta_id int) int
- func FailoverToMaster(op_id int64, bs_id int, dsn string, slave_id int) int
- func GetAssetType(bs_id int) int
- func GetChangeMasterCmd(db_id int, log_file string, log_pos string) (string, error)
- func GetCurrentOpId(bs_id int, op_type string) (int64, error)
- func GetDatabaseRole(db *xorm.Engine) int
- func GetDsn(db_id int, asset_type int) (string, error)
- func GetIps(dr_id int) (string, error)
- func GetIsShiftIP(bs_id int) int
- func GetMirrorDbname(dr_id int) (string, error)
- func GetMirrorRole(db *sql.DB, db_name string) (int, error)
- func GetMirrorState(db *sql.DB, db_name string) (int, error)
- func GetOnProcess(bs_id int) (int, error)
- func GetOpResultById(op_id int64) (string, string, error)
- func GetPrimaryDBId(bs_id int) (int, error)
- func GetPrimaryOSId(db_id int) int
- func GetRestorePointName(P godror.ConnectionParams) ([]string, error)
- func GetStaNetcard(dr_id int) (string, error)
- func GetStandbyDBId(bs_id int) (int, error)
- func GetTransferStatus(sta_id int) string
- func Init_OP_Instance(op_id int64, bs_id int, asset_type int, op_type string) error
- func Log_OP_Process(op_id int64, bs_id int, asset_type int, op_type string, process_desc string) error
- func MoveOpRecordToHis(bs_id int, op_type string) error
- func OperationLock(bs_id int, op_type string) error
- func OperationUnlock(bs_id int, op_type string) error
- func OraFailoverToPrimary(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraPrimaryToStandby(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraRecover(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraStandbyToPrimary(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraStartFlashback(op_id int64, bs_id int, fb_method int, fb_point string, fb_time string, ...) int
- func OraStartRead(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraStartSnapshot(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraStartSync(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraStopRead(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraStopSnapshot(op_id int64, bs_id int, P godror.ConnectionParams) int
- func OraStopSync(op_id int64, bs_id int, P godror.ConnectionParams) int
- func RebuildReplication(op_id int64, bs_id int, dsn_p string, dsn_s string, slave_id int) int
- func SlaveToMaster(op_id int64, bs_id int, dsn_p string, dsn_s string, slave_id int) int
- func SwitchIPs(op_id int64, dr_id int, asset_type int, pri_id int, sta_id int) int
- func SwitchMirror(op_id int64, bs_id int, dsn_p string, dsn_s string, db_name string) int
- func Unbind_IPs(db_id int, ips string) int
- func UpdateSwitchFlag(bs_id int)
- func Update_OP_Reason(op_id int64, reason string)
- func Update_OP_Result(op_id int64, result int)
- type Dr
- type DrMSSqlPrimary
- type DrMSSqlStandby
- type DrMySQLPrimary
- type DrMySQLStandby
- type DrPrimary
- type DrStandby
- type MSSqlInstance
- type MySQLInstance
- type OracleInstance
- type OsInfo
- type Process
- type Redo
- type RestorePoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDrConfig ¶
func GetAssetType ¶
func GetChangeMasterCmd ¶
func GetDatabaseRole ¶
func GetIsShiftIP ¶
func GetMirrorDbname ¶
func GetOnProcess ¶
func GetPrimaryDBId ¶
func GetPrimaryOSId ¶
func GetRestorePointName ¶
func GetRestorePointName(P godror.ConnectionParams) ([]string, error)
func GetStaNetcard ¶
func GetStandbyDBId ¶
func GetTransferStatus ¶
func Init_OP_Instance ¶
func Log_OP_Process ¶
func MoveOpRecordToHis ¶
func OperationLock ¶
func OperationUnlock ¶
func OraFailoverToPrimary ¶
func OraFailoverToPrimary(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraPrimaryToStandby ¶
func OraPrimaryToStandby(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraRecover ¶
func OraRecover(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraStandbyToPrimary ¶
func OraStandbyToPrimary(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraStartFlashback ¶
func OraStartRead ¶
func OraStartRead(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraStartSnapshot ¶
func OraStartSnapshot(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraStartSync ¶
func OraStartSync(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraStopRead ¶
func OraStopRead(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraStopSnapshot ¶
func OraStopSnapshot(op_id int64, bs_id int, P godror.ConnectionParams) int
func OraStopSync ¶
func OraStopSync(op_id int64, bs_id int, P godror.ConnectionParams) int
func RebuildReplication ¶
func SlaveToMaster ¶
func SwitchMirror ¶
func Unbind_IPs ¶
func UpdateSwitchFlag ¶
func UpdateSwitchFlag(bs_id int)
func Update_OP_Reason ¶
func Update_OP_Result ¶
Types ¶
type Dr ¶
type Dr struct { Id int `orm:"pk;column(id);"` Bs_Name string `orm:"column(bs_name);"` Db_Id_P int `orm:"column(db_id_p);"` Db_Type_P int `orm:"column(db_type_p);"` Host_P string `orm:"column(host_p);"` Port_P int `orm:"column(port_p);"` Alias_P string `orm:"column(alias_p);"` Inst_Name_P string `orm:"column(inst_name_p);"` Db_Name_P string `orm:"column(db_name_p);"` Db_Time_P string `orm:"column(db_time_p);"` Db_Id_S int `orm:"column(db_id_s);"` Db_Type_S int `orm:"column(db_type_s);"` Host_S string `orm:"column(host_s);"` Port_S int `orm:"column(port_s);"` Alias_S string `orm:"column(alias_s);"` Inst_Name_S string `orm:"column(inst_name_s);"` Db_Name_S string `orm:"column(db_name_s);"` Db_Time_S string `orm:"column(db_time_s);"` Repl_Status string `orm:"column(repl_status);"` Repl_Delay string `orm:"column(repl_delay);"` Is_Switch int `orm:"column(is_switch);"` }
type DrMSSqlPrimary ¶
type DrMSSqlPrimary struct { Id int `orm:"pk;column(id);"` Dr_Id int `orm:"column(dr_id);"` Db_Id int `orm:"column(db_id);"` Database_Id int `orm:"column(database_id);"` Db_Name string `orm:"column(db_name);"` Role int `orm:"column(role);"` State int `orm:"column(state);"` State_Desc string `orm:"column(state_desc);"` Safety_Level int `orm:"column(safety_level);"` Partner_Name string `orm:"column(partner_name);"` Partner_Instance string `orm:"column(partner_instance);"` Failover_Lsn int64 `orm:"column(failover_lsn);"` Connection_Timeout int `orm:"column(connection_timeout);"` Redo_Queue int `orm:"column(redo_queue);"` End_Of_Log_Lsn int64 `orm:"column(end_of_log_lsn);"` Replication_Lsn int64 `orm:"column(replication_lsn);"` Created int64 `orm:"column(created);"` }
func GetDrMSSqlPrimaryInfo ¶
func GetDrMSSqlPrimaryInfo(db_id int) (DrMSSqlPrimary, error)
type DrMSSqlStandby ¶
type DrMSSqlStandby struct { Id int `orm:"pk;column(id);"` Dr_Id int `orm:"column(dr_id);"` Db_Id int `orm:"column(db_id);"` Database_Id int `orm:"column(database_id);"` Db_Name string `orm:"column(db_name);"` Master_Server string `orm:"column(master_server);"` Master_Port string `orm:"column(master_port);"` Role int `orm:"column(role);"` State int `orm:"column(state);"` State_Desc string `orm:"column(state_desc);"` Safety_Level int `orm:"column(safety_level);"` Partner_Name string `orm:"column(partner_name);"` Partner_Instance string `orm:"column(partner_instance);"` Failover_Lsn int64 `orm:"column(failover_lsn);"` Connection_Timeout int `orm:"column(connection_timeout);"` Redo_Queue int `orm:"column(redo_queue);"` End_Of_Log_Lsn int64 `orm:"column(end_of_log_lsn);"` Replication_Lsn int64 `orm:"column(replication_lsn);"` Created int64 `orm:"column(created);"` }
func GetDrMSSqlStandbyInfo ¶
func GetDrMSSqlStandbyInfo(db_id int) (DrMSSqlStandby, error)
type DrMySQLPrimary ¶
type DrMySQLPrimary struct { Id int `orm:"pk;column(id);"` Dr_Id int `orm:"column(dr_id);"` Db_Id int `orm:"column(db_id);"` Read_Only string `orm:"column(read_only);"` Gtid_Mode string `orm:"column(gtid_mode);"` M_Binlog_File string `orm:"column(master_binlog_file);"` M_Binlog_Pos string `orm:"column(master_binlog_pos);"` M_Binlog_Space int64 `orm:"column(master_binlog_space);"` Created int64 `orm:"column(created);"` }
func GetDrMySqlPrimaryInfo ¶
func GetDrMySqlPrimaryInfo(db_id int) (DrMySQLPrimary, error)
type DrMySQLStandby ¶
type DrMySQLStandby struct { Id int `orm:"pk;column(id);"` Dr_Id int `orm:"column(dr_id);"` DB_Id int `orm:"column(db_id);"` Read_Only string `orm:"column(read_only);"` Gtid_Mode string `orm:"column(gtid_mode);"` M_Server string `orm:"column(master_server);"` M_Port string `orm:"column(master_port);"` Slave_IO_Run string `orm:"column(slave_io_run);"` Slave_SQL_Run string `orm:"column(slave_sql_run);"` Delay int `orm:"column(delay);"` C_Binlog_File string `orm:"column(current_binlog_file);"` C_Binlog_Pos string `orm:"column(current_binlog_pos);"` M_Binlog_File string `orm:"column(master_binlog_file);"` M_Binlog_Pos string `orm:"column(master_binlog_pos);"` M_Binlog_Space int64 `orm:"column(master_binlog_space);"` Created int64 `orm:"column(created);"` }
func GetDrMySqlStandbyInfo ¶
func GetDrMySqlStandbyInfo(db_id int) (DrMySQLStandby, error)
type DrPrimary ¶
type DrPrimary struct { DB_Id int `orm:"pk;column(db_id);"` Check_Seq string `orm:"column(check_seq);"` Dest_Id int `orm:"column(dest_id);"` Transmit_Mode string `orm:"column(transmit_mode);"` Thread int `orm:"column(thread);"` Sequence int `orm:"column(sequence);"` Curr_Scn int64 `orm:"column(curr_scn);"` Curr_Db_Time string `orm:"column(curr_db_time);"` Archived_delay int `orm:"column(archived_delay);"` Applied_delay int `orm:"column(applied_delay);"` Created int64 `orm:"column(created);"` }
func GetPrimaryDrInfo ¶
type DrStandby ¶
type DrStandby struct { DB_Id int `orm:"pk;column(db_id);"` Thread int `orm:"column(thread);"` Sequence int `orm:"column(sequence);"` Block string `orm:"column(block);"` Delay_Mins int `orm:"column(delay_mins);"` Apply_Rate string `orm:"column(apply_rate);"` Curr_Scn int64 `orm:"column(curr_scn);"` Curr_Db_Time string `orm:"column(curr_db_time);"` Mrp_Status string `orm:"column(mrp_status);"` Created int64 `orm:"column(created);"` }
func GetStandbyDrInfo ¶
type MSSqlInstance ¶
type MSSqlInstance struct { Id int `orm:"pk;column(id);"` Asset_Type int `orm:"column(asset_type);"` Connect int `orm:"column(connect);"` Instance_name string `orm:"column(instance_name);"` Db_Name string `orm:"column(db_name);"` Host string `orm:"column(host);"` Port string `orm:"column(port);"` Role string `orm:"column(role);"` Version string `orm:"column(version);"` Created int64 `orm:"column(created);"` }
func GetMSSqlBasicInfo ¶
func GetMSSqlBasicInfo(db_id int) (MSSqlInstance, error)
type MySQLInstance ¶
type MySQLInstance struct { Id int `orm:"pk;column(id);"` Asset_Type int `orm:"column(asset_type);"` Connect int `orm:"column(connect);"` Instance_name string `orm:"column(instance_name);"` Db_Name string `orm:"column(db_name);"` Host string `orm:"column(host);"` Port string `orm:"column(port);"` Role string `orm:"column(role);"` Version string `orm:"column(version);"` Created int64 `orm:"column(created);"` }
func GetMySQLBasicInfo ¶
func GetMySQLBasicInfo(db_id int) (MySQLInstance, error)
type OracleInstance ¶
type OracleInstance struct { Id int `orm:"pk;column(id);"` Asset_Type int `orm:"column(asset_type);"` Connect int `orm:"column(connect);"` Instance_name string `orm:"column(instance_name);"` Db_Name string `orm:"column(db_name);"` Host string `orm:"column(host);"` Port string `orm:"column(port);"` Role string `orm:"column(inst_role);"` Version string `orm:"column(version);"` Open_Mode string `orm:"column(open_mode);"` Flashback_On string `orm:"column(flashback_on);"` Flashback_Usage string `orm:"column(flashback_usage);"` Created int64 `orm:"column(created);"` }
func GetOracleBasicInfo ¶
func GetOracleBasicInfo(db_id int) (OracleInstance, error)
type OsInfo ¶
type OsInfo struct { DB_Id int `orm:"pk;column(db_id);"` Host string `orm:"column(host);"` Port string `orm:"column(os_port);"` Os_Type string `orm:"column(os_type);"` Os_Protocol string `orm:"column(os_protocol);"` Os_Username string `orm:"column(os_username);"` Os_Password string `orm:"column(os_password);"` }
type Process ¶
func GetOPProcessById ¶
type Redo ¶
type Redo struct { Key_Time string `orm:"pk;column(key_time);"` Value int `orm:"column(redo_log);"` }
func GetOracleRedo ¶
type RestorePoint ¶
type RestorePoint struct {
Name string `orm:"column(name);"`
}
Click to show internal directories.
Click to hide internal directories.