infra

package
v0.0.0-...-06b744f Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close 关闭 MySQL 连接

func Init

func Init(confDir, confFileName, confFileType, logDir string) *gorm.DB

Init 初始化数据库

func Ping

func Ping()

Ping 保持与 MySQL 的连接

func ScanOutbox

func ScanOutbox(ctx context.Context, producer *kafka.Writer)

Types

type PoolConfig

type PoolConfig struct {
	MaxIdleConns    int           // 空闲连接数目上限
	MaxOpenConns    int           // 最多打开链接数目上限
	ConnMaxLifetime time.Duration // 单个连接的连接时间上限
}

Jump to

Keyboard shortcuts

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