Documentation ¶
Index ¶
- type Config
- type KV
- type Redis
- func (r *Redis) Delete(key string) (err error)
- func (r *Redis) Empty() (err error)
- func (r *Redis) IsStored(key string) bool
- func (r *Redis) Read(key string) (value []byte, err error)
- func (r *Redis) ReadFirstValueByPrefix(prefix string) (value []byte, err error)
- func (r *Redis) ReadKeyValues() (value map[string][]byte, err error)
- func (r *Redis) ReadKeys() (value []string, err error)
- func (r *Redis) ReadKeysWithPrefix(prefix string) (keys []string, err error)
- func (r *Redis) ReadPrefix(prefix string) (value [][]byte, err error)
- func (r *Redis) ReadPrefixWithKey(prefix string) (value map[string][]byte, err error)
- func (r *Redis) Store(key string, value []byte) (err error)
- func (r *Redis) StoreBatch(batch interface{}) (err error)
- func (r *Redis) StoreQueueBatch(v interface{}) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KV ¶
type KV struct { *Redis // contains filtered or unexported fields }
KV instance of key value store designed to treat block structs
type Redis ¶
type Redis struct {
*redis.Client
}
Redis client wrapper
func (*Redis) IsStored ¶
IsStored returns true if the block corresponding to passed hash is stored in db
func (*Redis) ReadFirstValueByPrefix ¶
ReadFirstValueByPrefix returns the first value matched by prefix
func (*Redis) ReadKeyValues ¶
ReadKeyValues concurrent read values based on a prefix
func (*Redis) ReadKeysWithPrefix ¶
ReadKeysWithPrefix concurrent read values based on a prefix
func (*Redis) ReadPrefix ¶
ReadPrefix concurrent read values based on a prefix
func (*Redis) ReadPrefixWithKey ¶
ReadPrefixWithKey concurrent read values based on a prefix
func (*Redis) StoreBatch ¶
StoreBatch insert new key-value in redis
func (*Redis) StoreQueueBatch ¶
StoreQueueBatch loads a queue until a threshold to perform a bulk insertion
Click to show internal directories.
Click to hide internal directories.