Merge branch 'v3' into v3
Some checks failed
autoapprove / autoapprove (pull_request) Failing after 1s
automerge / automerge (pull_request) Failing after 1s
dependabot-automerge / automerge (pull_request) Has been skipped
prbuild / test (pull_request) Failing after 4m53s
prbuild / lint (pull_request) Successful in 9m29s
Some checks failed
autoapprove / autoapprove (pull_request) Failing after 1s
automerge / automerge (pull_request) Failing after 1s
dependabot-automerge / automerge (pull_request) Has been skipped
prbuild / test (pull_request) Failing after 4m53s
prbuild / lint (pull_request) Successful in 9m29s
This commit is contained in:
commit
25b86eaad5
12
redis.go
12
redis.go
@ -67,6 +67,18 @@ type Store struct {
|
|||||||
mu sync.RWMutex
|
mu sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *Store) Live() bool {
|
||||||
|
return r.connected.Load() == 1
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Store) Ready() bool {
|
||||||
|
return r.connected.Load() == 1
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Store) Health() bool {
|
||||||
|
return r.connected.Load() == 1
|
||||||
|
}
|
||||||
|
|
||||||
func (r *Store) Connect(ctx context.Context) error {
|
func (r *Store) Connect(ctx context.Context) error {
|
||||||
if r.connected.Load() == 1 {
|
if r.connected.Load() == 1 {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user