MCPcopy Index your code
hub / github.com/1Panel-dev/KubePi / Convert

Method Convert

thirdparty/gotty/server/options.go:135–145  ·  view source on GitHub ↗

Convert RedisOptions to redis-go Options

()

Source from the content-addressed store, hash-verified

133
134//Convert RedisOptions to redis-go Options
135func (ro *RedisOptions) Convert() *redis.Options {
136 return &redis.Options{
137 Addr: ro.Addr,
138 Username: ro.Username,
139 Password: ro.Password,
140 DB: ro.DB,
141 PoolSize: ro.PoolSize,
142 MinIdleConns: ro.MinIdleConns,
143 MaxConnAge: ro.MaxConnAge,
144 }
145}
146
147func (ro *RedisOptions) Validate() error {
148 if ro.UseRedisTokenCache == "true" && ro.Addr == "" {

Callers 1

NewFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected