mysqlex

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToInt64

func BytesToInt64(b []byte) (int64, error)

func GetMasterAndSlaveStatus

func GetMasterAndSlaveStatus(db *sql.DB, mysqlAddr string) (string, error)

func MergeMapUint64

func MergeMapUint64(dst map[string]uint64, src map[string]uint64) map[string]uint64

func MysqlShowGlobalStatus

func MysqlShowGlobalStatus(db *sql.DB) (map[string]int64, error)

func MysqlShowInnodbStatus

func MysqlShowInnodbStatus(db *sql.DB) (map[string]uint64, error)

func ParseInnodbStatusFileIO

func ParseInnodbStatusFileIO(line string) map[string]uint64

func ParseInnodbStatusLog

func ParseInnodbStatusLog(line string) map[string]uint64

func ParseInnodbStatusRowOperation

func ParseInnodbStatusRowOperation(line string) map[string]uint64

func ParseInnodbStatusSemaphores

func ParseInnodbStatusSemaphores(line string) map[string]uint64

func ParseInnodbStatusTransactions

func ParseInnodbStatusTransactions(line string) map[string]uint64

Types

type MySQLSalveStatus

type MySQLSalveStatus struct {
	Is_Slave bool

	Master_Host string
	Master_Port int32

	Master_User     string
	Master_Password string

	Master_Log_File     string
	Read_Master_Log_Pos uint64

	Relay_Log_File string
	Relay_Log_Pos  uint64

	Relay_Master_Log_File string
	Exec_Master_Log_Pos   uint64

	Relay_Log_Space uint64

	Slave_IO_Running  bool
	Slave_SQL_Running bool

	Seconds_Behind_Master uint64
	SQL_Delay             uint64

	Master_UUID        string
	Auto_Position      int32
	Retrieved_Gtid_Set string
	Executed_Gtid_Set  string

	Replicate_Do_DB             string
	Replicate_Ignore_DB         string
	Replicate_Do_Table          string
	Replicate_Ignore_Table      string
	Replicate_Wild_Do_Table     string
	Replicate_Wild_Ignore_Table string

	Replicate_Ignore_Server_Ids string
	Master_Server_Id            int32

	Until_Condition string
	Until_Log_File  string
	Until_Log_Pos   uint64

	Last_Errno               int32
	Last_Error               string
	Last_IO_Errno            int32
	Last_IO_Error            string
	Last_IO_Error_Timestamp  int32
	Last_SQL_Errno           int32
	Last_SQL_Error           string
	Last_SQL_Error_Timestamp int32
}

func MysqlShowSlaveStatusStr

func MysqlShowSlaveStatusStr(db *sql.DB) (MySQLSalveStatus, error)

func (MySQLSalveStatus) String

func (this MySQLSalveStatus) String() string

type MysqGloballVars

type MysqGloballVars struct {
	V_read_only              uint8
	V_pid_file               string
	V_default_storage_engine string
	V_super_read_only        uint8
	V_innodb_read_only       uint8
	V_max_connections        int64
	V_max_user_connections   int64
	V_relay_log_space_limit  int64
	V_port                   int64
}

func MysqlShowGlobalVars

func MysqlShowGlobalVars(db *sql.DB) (MysqGloballVars, error)

type MysqlMasterStatus

type MysqlMasterStatus struct {
	File              string
	Position          uint64
	Binlog_Do_DB      string
	Binlog_Ignore_DB  string
	Executed_Gtid_Set string
}

func MysqlShowMasterStatus

func MysqlShowMasterStatus(db *sql.DB) (MysqlMasterStatus, error)

func (MysqlMasterStatus) String

func (this MysqlMasterStatus) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL