conf

package
v0.0.0-...-2499e25 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppEnv   string
	AppDebug bool

	// web 服务中是否存在gRpc服务,主要是启动的时候是否要加载grpcconf中的gRpc client初始化
	WebHasGRPCService bool
)

配置文件对应的变量

Functions

func GetRedisObj

func GetRedisObj(name string) (redis.Conn, error)

GetRedisObj 从连接池中获取redis client 用完就需要调用redisObj.Close()释放连接,防止过多的连接导致redis连接过多 导致当前请求而陷入长久等待,从而redis崩溃

func InitConf

func InitConf(path string)

InitConf 初始化配置文件

func InitRedis

func InitRedis()

InitRedis 初始化redis

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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