database

package
v0.0.0-...-63006e8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQLConn

type MySQLConn struct {
	DB       *gorm.DB
	Username string
	Password string
	Host     string
	Port     int
	DBName   string
}

func (*MySQLConn) Close

func (cfg *MySQLConn) Close()

close mysql connect

func (*MySQLConn) NewConn

func (cfg *MySQLConn) NewConn() (err error)

build new connect

func (*MySQLConn) QuerySlaveStatus

func (cfg *MySQLConn) QuerySlaveStatus() (data *QuerySlaveStatusResult, err error)

type QuerySlaveStatusResult

type QuerySlaveStatusResult struct {
	SecondsBehindMaster int    `gorm:"column:Seconds_Behind_Master"`
	SlaveIORunning      string `gorm:"column:Slave_IO_Running"`
	SlaveSQLRunning     string `gorm:"column:Slave_SQL_Running"`
	LastError           string `gorm:"column:Last_Error"`
	LastIOError         string `gorm:"column:Last_IO_Error"`
	LastSQLError        string `gorm:"column:Last_SQL_Error"`
}

Jump to

Keyboard shortcuts

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