Skip to content

Commit

Permalink
feat: add env config for redis
Browse files Browse the repository at this point in the history
  • Loading branch information
suyuan32 committed Apr 11, 2024
1 parent f620d34 commit 5c8909a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/stores/redis/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ var (
type (
// A RedisConf is a redis config.
RedisConf struct {
Host string
Type string `json:",default=node,options=node|cluster"`
Pass string `json:",optional"`
Tls bool `json:",optional"`
Host string `json:",env=REDIS_HOST"`
Type string `json:",default=node,options=node|cluster,env=REDIS_TYPE"`
Pass string `json:",optional,env=REDIS_PASSWORD"`
Tls bool `json:",optional,env=REDIS_TLS"`
NonBlock bool `json:",default=true"`
// PingTimeout is the timeout for ping redis.
PingTimeout time.Duration `json:",default=1s"`
Expand Down

0 comments on commit 5c8909a

Please sign in to comment.