database

package
v0.0.0-...-7bad096 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB // GORM数据库实例
View Source
var MAX_POOL_SIZE = 20

Redis连接池大小

View Source
var RedisConn *redis.Client
View Source
var RedisPoll chan *redis.Client

Functions

func Close

func Close()

Close 关闭数据库连接

func ConnRedis

func ConnRedis(network, address string) *redis.Client

func GetDB

func GetDB() *gorm.DB

GetDB 获取GORM数据库实例

func Init

func Init()

Init 初始化GORM数据库连接

func InitRedis

func InitRedis()

Types

This section is empty.

Jump to

Keyboard shortcuts

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