Documentation ¶
Index ¶
Constants ¶
View Source
const MysqlDriverName = "mysql"
View Source
const PostgresDriverName = "postgres"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangelogSQLDB ¶
type ChangelogSQLDB struct {
// contains filtered or unexported fields
}
func NewChangelogSQLDB ¶
func NewChangelogSQLDB(dbUrl string) (*ChangelogSQLDB, error)
func (*ChangelogSQLDB) Close ¶
func (cdb *ChangelogSQLDB) Close() error
func (*ChangelogSQLDB) DeleteExpiredLock ¶
func (cdb *ChangelogSQLDB) DeleteExpiredLock(timeoutInSecond int) error
type Database ¶
func GetConnection ¶
*
This function is used to generate db connection info, for example, For mysql: input dbUrl: 'username:password@tcp(localhost:3306)/autoscaler?tls=custom&sslrootcert=db_ca.crt' return: &Database{DriverName: "mysql", DSN:"username:password@tcp(localhost:3306)/autoscaler?parseTime=true&tls=custom"}
For postgres:
input dbUrl: postgres://postgres:password@localhost:5432/autoscaler?sslmode=disable return: &Database{DriverName: "postgres", DSN:"postgres://postgres:password@localhost:5432/autoscaler?sslmode=disable" *
type MySQLConfig ¶
type MySQLConfig struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.