Documentation ¶
Index ¶
- func GetFingerPrintListName() string
- func GetIdleTimeout() int
- func GetMaxActive() int
- func GetMaxConnLifetime() int
- func GetMaxIdle() int
- func GetPortScannerListName() string
- func GetRedisIP() string
- func GetRedisPassword() string
- func GetRedisPort() string
- func PushPortScannerTask(conn redis.Conn, ip string) error
- func SendToFingerPrintList(conn redis.Conn, s string) error
- type RedisConn
- type RedisPool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFingerPrintListName ¶
func GetFingerPrintListName() string
GetFingerPrintListName 读取application.yaml配置文件内redis.FingerPrintListName
func GetIdleTimeout ¶
func GetIdleTimeout() int
GetIdleTimeout 读取application.yaml配置文件内redis.IdleTimeout
func GetMaxConnLifetime ¶
func GetMaxConnLifetime() int
GetMaxConnLifetime 读取application.yaml配置文件内redis.MaxConnLifetime
func GetPortScannerListName ¶
func GetPortScannerListName() string
GetPortScannerListName 读取application.yaml配置文件内redis.PortScannerListName
func GetRedisPassword ¶
func GetRedisPassword() string
GetRedisPassword 读取application.yaml配置文件内redis.Password
Types ¶
type RedisConn ¶
type RedisConn struct {
// contains filtered or unexported fields
}
RedisConn 非连接池
func (*RedisConn) NewRedisClient ¶
func (redisConn *RedisConn) NewRedisClient()
NewRedisClient redis初始化连接
type RedisPool ¶
type RedisPool struct { Dial func() (redis.Conn, error) // 连接数据库使用 MaxIdle int // 最大空闲数 MaxActive int // 最大存活数 IdleTimeout time.Duration // 空闲超时时间 MaxConnLifetime time.Duration // 最大生命周期 Pool *redis.Pool // 全局redis连接池句柄 }
RedisPool 连接池
func (*RedisPool) NewRedisPool ¶
func (redisPool *RedisPool) NewRedisPool()
InitRedis 初始化RedisPool(连接池版本)
Click to show internal directories.
Click to hide internal directories.