Documentation ¶
Index ¶
- type GoRedisV9Adapter
- func (r *GoRedisV9Adapter) Del(ctx context.Context, key string) (val int64, err error)
- func (r *GoRedisV9Adapter) Get(ctx context.Context, key string) (val string, err error)
- func (r *GoRedisV9Adapter) MGet(ctx context.Context, keys ...string) (map[string]any, error)
- func (r *GoRedisV9Adapter) MSet(ctx context.Context, value map[string]any, expire time.Duration) error
- func (r *GoRedisV9Adapter) Nil() error
- func (r *GoRedisV9Adapter) SetEX(ctx context.Context, key string, value any, expire time.Duration) error
- func (r *GoRedisV9Adapter) SetNX(ctx context.Context, key string, value any, expire time.Duration) (val bool, err error)
- func (r *GoRedisV9Adapter) 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 GoRedisV9Adapter ¶ added in v1.1.6
type GoRedisV9Adapter struct {
// contains filtered or unexported fields
}
func (*GoRedisV9Adapter) Nil ¶ added in v1.1.6
func (r *GoRedisV9Adapter) 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 NewGoRedisV9Adapter ¶ added in v1.1.6
func NewGoRedisV9Adapter(client redis.Cmdable) Remote
NewGoRedisV9Adapter is
Click to show internal directories.
Click to hide internal directories.