Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyValue ¶
type KeyValue interface { Get(key string) ([]byte, error) Set(key string, value []byte, expiration time.Duration) error Delete(key string) error Ready() error }
KeyValue is the interface for a storage holding key-value pairs.
type KeyValueMock ¶
KeyValueMock is a mock for the KeyValue interface.
func NewKeyValueMock ¶
func NewKeyValueMock() *KeyValueMock
NewKeyValueMock creates a KeyValueMock instance.
func (*KeyValueMock) Delete ¶
func (k *KeyValueMock) Delete(key string) error
Delete implements the method with the same name from KeyValue.
func (*KeyValueMock) Get ¶
func (k *KeyValueMock) Get(key string) ([]byte, error)
Get implements the method with the same name from KeyValue.
func (*KeyValueMock) Ready ¶
func (k *KeyValueMock) Ready() error
Ready implements the method with the same name from KeyValue.
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis is a wrapper over the redis client.
func NewRedis ¶
func NewRedis(options *redis.Options) *Redis
NewRedis creates a new instance of Redis storage.
Click to show internal directories.
Click to hide internal directories.