Discover Packages
github.com/layasugar/laya
gstore
package
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: Jan 28, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
README
README
¶
gstore
引入
import "github.com/layasugar/laya/gstore"
初始化各种db
Expand ▾
Collapse ▴
Documentation
¶
View Source
const (
LevelInfo = "info"
LevelWarn = "warn"
LevelError = "error"
)
func InitRdb(cfg redis.Options) *redis.Client
InitRdb 初始化redis
func RdbSurvive(rdb *redis.Client) error
RdbSurvive redis存活检测
type DbConnFunc func(cfg *dbConfig)
SetGormConfig set gorm config
SetPoolConfig set pool config
type DbPoolCfg struct {
MaxIdleConn int `json:"max_idle_conn"`
MaxOpenConn int `json:"max_open_conn"`
MaxLifeTime int `json:"max_life_time"`
MaxIdleTime int `json:"max_idle_time"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.