Documentation ¶
Index ¶
- type GoRedisV8Adaptor
- func (r *GoRedisV8Adaptor) Del(ctx context.Context, key string) (val int64, err error)
- func (r *GoRedisV8Adaptor) Get(ctx context.Context, key string) (val string, err error)
- func (r *GoRedisV8Adaptor) MGet(ctx context.Context, keys ...string) (map[string]any, error)
- func (r *GoRedisV8Adaptor) MSet(ctx context.Context, value map[string]any, expire time.Duration) error
- func (r *GoRedisV8Adaptor) Nil() error
- func (r *GoRedisV8Adaptor) SetEX(ctx context.Context, key string, value any, expire time.Duration) error
- func (r *GoRedisV8Adaptor) SetNX(ctx context.Context, key string, value any, expire time.Duration) (val bool, err error)
- func (r *GoRedisV8Adaptor) SetXX(ctx context.Context, key string, value any, expire time.Duration) (val bool, err error)
- type Remote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoRedisV8Adaptor ¶
type GoRedisV8Adaptor struct {
// contains filtered or unexported fields
}
func (*GoRedisV8Adaptor) Nil ¶
func (r *GoRedisV8Adaptor) Nil() error
type Remote ¶
type Remote interface { // SetEX sets the expiration value for a key. SetEX(ctx context.Context, key string, value any, expire time.Duration) error // SetNX sets the value of a key if it does not already exist. SetNX(ctx context.Context, key string, value any, expire time.Duration) (val bool, err error) // SetXX sets the value of a key if it already exists. SetXX(ctx context.Context, key string, value any, expire time.Duration) (val bool, err error) // Get retrieves the value of a key. It returns errNotFound (e.g., redis.Nil) when the key does not exist. Get(ctx context.Context, key string) (val string, err error) // Del deletes the cached value associated with a key. Del(ctx context.Context, key string) (val int64, err error) // MGet retrieves the values of multiple keys. MGet(ctx context.Context, keys ...string) (map[string]any, error) // MSet sets multiple key-value pairs in the cache. MSet(ctx context.Context, value map[string]any, expire time.Duration) error // Nil returns an error indicating that the key does not exist. Nil() error }
func NewGoRedisV8Adaptor ¶
func NewGoRedisV8Adaptor(client redis.Cmdable) Remote
NewGoRedisV8Adaptor is
Click to show internal directories.
Click to hide internal directories.