From 5f5ce494079b8f86dff70d07a4e49450a2893979 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 4 Dec 2024 14:39:42 +0300 Subject: [PATCH] update for latest micro Signed-off-by: Vasiliy Tolstov --- redis.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/redis.go b/redis.go index 392e9de..9db91f4 100755 --- a/redis.go +++ b/redis.go @@ -67,6 +67,18 @@ type Store struct { 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 { if r.connected.Load() == 1 { return nil