Documentation
¶
Index ¶
- type Client
- func (client *Client) Decr(key string) error
- func (client *Client) Del(key string) error
- func (client *Client) Get(key string) (string, error)
- func (client *Client) Incr(key string) error
- func (client *Client) IsSet(key string) (bool, error)
- func (client *Client) List(pattern string) ([]string, error)
- func (client *Client) Set(key string, value interface{}, expiration time.Duration) error
- func (client *Client) SetNX(key string, value interface{}, expiration time.Duration) (bool, error)
- func (client *Client) SetUpExpirationListener(ctx context.Context, pattern string, handler func(key string) error) error
- func (client *Client) SetXX(key string, value interface{}, expiration time.Duration) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
RedisClient *redis.Client
}
Client is used to manage key-value pairs in Redis.
func (*Client) SetUpExpirationListener ¶
func (client *Client) SetUpExpirationListener(ctx context.Context, pattern string, handler func(key string) error) error
SetUpExpirationListener sets up a listener for expired key events for every key that matches the given pattern. It is non-blocking and will run in a separate goroutine.
Click to show internal directories.
Click to hide internal directories.