Documentation ¶
Index ¶
- type KeyValueStore
- func (kvs KeyValueStore) Del(ctx context.Context, key ...string) error
- func (kvs KeyValueStore) Get(ctx context.Context, key string, result any) error
- func (kvs KeyValueStore) GetSet(ctx context.Context, key string, value any, ttl time.Duration, oldValue any) error
- func (kvs KeyValueStore) Set(ctx context.Context, key string, value any, ttl time.Duration) error
- type RedisStore
- func (r RedisStore) Del(ctx context.Context, keys ...string) error
- func (r RedisStore) Get(ctx context.Context, key string) ([]byte, error)
- func (r RedisStore) GetSet(ctx context.Context, key string, value []byte, ttl time.Duration) ([]byte, error)
- func (r RedisStore) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyValueStore ¶
type KeyValueStore struct {
// contains filtered or unexported fields
}
func New ¶
func New(c Store) KeyValueStore
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
func NewRedis ¶
func NewRedis(redis *redis.Client) RedisStore
Click to show internal directories.
Click to hide internal directories.