Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStore ¶
type RedisStore interface {
CloseClient() error
Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
Get(ctx context.Context, key string) (string, error)
Exists(ctx context.Context, key string) (bool, error)
Delete(ctx context.Context, key string) error
Publish(ctx context.Context, channel string, message interface{}) error
Subscribe(ctx context.Context, channel string) (<-chan *redis.Message, error)
SubscribeLog(ctx context.Context) (<-chan *redis.Message, error)
LPush(ctx context.Context, key string, value interface{}) error
RPush(ctx context.Context, key string, value any) error
LRange(ctx context.Context, key string, start int64, stop int64) ([]string, error)
BRPop(ctx context.Context, key string) (string, error)
BLMOVE(ctx context.Context, source string, destination string) (string, error)
LREM(ctx context.Context, key string, count int64, value interface{}) error
LIndex(ctx context.Context, key string, index int64) error
}
func NewRedisStore ¶
func NewRedisStore(addr string, password string, db int) (RedisStore, error)
Click to show internal directories.
Click to hide internal directories.