File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,24 @@ import (
66 "net"
77 "strings"
88
9+ "github.com/go-redis/redis/v7/internal/pool"
910 "github.com/go-redis/redis/v7/internal/proto"
1011)
1112
13+ var ErrClosed = pool .ErrClosed
14+
15+ type Error interface {
16+ error
17+
18+ // RedisError is a no-op function but
19+ // serves to distinguish types that are Redis
20+ // errors from ordinary errors: a type is a
21+ // Redis error if it has a RedisError method.
22+ RedisError ()
23+ }
24+
25+ var _ Error = proto .RedisError ("" )
26+
1227func isRetryableError (err error , retryTimeout bool ) bool {
1328 switch err {
1429 case nil , context .Canceled , context .DeadlineExceeded :
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ type RedisError string
2424
2525func (e RedisError ) Error () string { return string (e ) }
2626
27+ func (RedisError ) RedisError () {}
28+
2729//------------------------------------------------------------------------------
2830
2931type MultiBulkParse func (* Reader , int64 ) (interface {}, error )
You can’t perform that action at this time.
0 commit comments