헬스체크 추가
This commit is contained in:
1 parent
3c41c0dc62
commit
ffe96c8c65
6 files changed
+94
-18
No files matched your search
@@ -33,6 +33,13 @@ func NewRedisService() (*RedisService, error) {
|
||||
return &RedisService{Client: rdb}, nil
|
||||
}
|
||||
|
||||
func (s *RedisService) Ping(ctx context.Context) error {
|
||||
if s.Client == nil {
|
||||
return os.ErrInvalid
|
||||
}
|
||||
return s.Client.Ping(ctx).Err()
|
||||
}
|
||||
|
||||
// StoreVerificationCode saves the SMS verification code with a 3-minute expiration
|
||||
func (s *RedisService) StoreVerificationCode(phone, code string) error {
|
||||
// Key format: "sms_verify:01012345678"
|
||||
|
||||
Reference in new issue
Block a user