Skip to content

Commit

Permalink
add redis
Browse files Browse the repository at this point in the history
  • Loading branch information
liyuan1125 committed Jul 1, 2022
1 parent 97fb4eb commit 3016e63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions store/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ type Store struct {
store *redis.Client
}

func New(conf *redis.Options) *Store {
cli := redis.NewClient(conf)

return &Store{store: cli}
}

func NewWithDb(tx *redis.Client) *Store {
return &Store{store: tx}
}
Expand Down

0 comments on commit 3016e63

Please sign in to comment.