datastore

package
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 4 Imported by: 2

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL