Documentation ¶
Index ¶
- type Queue
- type QueueConfig
- type Storage
- func (s *Storage) Count(pattern string) (int64, error)
- func (s *Storage) Duplicate(key string, newKey string) error
- func (s *Storage) Exists(keys ...string) (int64, error)
- func (s *Storage) Expire(key string, after time.Duration) error
- func (s *Storage) Get(key string) (string, error)
- func (s *Storage) GetField(key string, field string) (string, error)
- func (s *Storage) GetInt(key string) (int64, error)
- func (s *Storage) GetKeys(pattern string) ([]string, error)
- func (s *Storage) GetMap(key string) (map[string]string, error)
- func (s *Storage) GetMapFields(key string, fields ...string) ([]interface{}, error)
- func (s *Storage) GetScore(key string, member string) (float64, error)
- func (s *Storage) GetSortedSetHTL(key string, start int64, stop int64) ([]string, error)
- func (s *Storage) GetSortedSetLTH(key string, start int64, stop int64) ([]string, error)
- func (s *Storage) GetStruct(key string, obj interface{}) error
- func (s *Storage) IncrementMapField(key string, field string, inc int) error
- func (s *Storage) IncrementSortedSetMemberScore(key string, member string, inc float64) error
- func (s *Storage) KeyExists(key string) (bool, error)
- func (s *Storage) KeysPrefixCount(prefix string) (int64, error)
- func (s *Storage) ListBlockingPopAndPush(from, to string, wait time.Duration) (string, error)
- func (s *Storage) ListGet(key string, index int64) (string, error)
- func (s *Storage) ListLen(key string) (int64, error)
- func (s *Storage) ListPush(key string, values ...interface{}) error
- func (s *Storage) ListRemove(key string, count int64, value string) (int64, error)
- func (s *Storage) ListShift(key string) (string, error)
- func (s *Storage) ListUnshift(key string, values ...interface{}) error
- func (s *Storage) MoveSortedSetMemberUpdating(fromKey string, toKey string, member string, newScore float64) error
- func (s *Storage) Publish(channel string, message string) error
- func (s *Storage) Remove(keys ...string) (int64, error)
- func (s *Storage) Rename(key, newKey string) error
- func (s *Storage) Set(key string, value interface{}, expiration time.Duration) error
- func (s *Storage) SetAdd(key string, member string) error
- func (s *Storage) SetGet(key string) ([]string, error)
- func (s *Storage) SetHasMember(key string, member string) (bool, error)
- func (s *Storage) SetIfNotExists(key string, value interface{}, expiration time.Duration) (bool, error)
- func (s *Storage) SetMap(key string, fields map[string]interface{}) error
- func (s *Storage) SetMapField(key string, field string, value string) error
- func (s *Storage) SortedSetAdd(key string, member string, score float64) error
- func (s *Storage) SortedSetCount(key, min, max string) (int64, error)
- func (s *Storage) SortedSetGetByScore(key string, min string, max string, limit int64) ([]string, error)
- func (s *Storage) SortedSetRemove(key string, member ...interface{}) (int64, error)
- func (s *Storage) SortedSetRemoveByScore(key string, min string, max string) (int64, error)
- func (s *Storage) SortedSetUpdate(key string, member string, score float64) error
- func (s *Storage) SortedSetsCardSum(prefix string) (int64, error)
- func (s *Storage) Start(subs ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func NewQueue ¶
func NewQueue(s *Storage, qk string, pk string, c QueueConfig) *Queue
NewQueue creates a new redis reliable queue instance
func (*Queue) Errors ¶
Errors feeds any errors happening while listening for items through a channel
type QueueConfig ¶
QueueConfig configures the queue settings
type Storage ¶
Storage facilitates streaming to redis
func (*Storage) GetMapFields ¶
GetMapFields gets fields from map
func (*Storage) GetSortedSetHTL ¶
GetSortedSetHTL gets sorted set at key high to low
func (*Storage) GetSortedSetLTH ¶
GetSortedSetLTH gets sorted set at key low to high
func (*Storage) GetStruct ¶
GetStruct gets a value at key as struct obj needs to follow UnmarshalBinary interface
func (*Storage) IncrementMapField ¶
IncrementMapField Increments a hash maps field by value
func (*Storage) IncrementSortedSetMemberScore ¶
IncrementSortedSetMemberScore Increments the score of a sorted set member
func (*Storage) KeysPrefixCount ¶
KeysPrefixCount returns the number of keys with a given prefix
func (*Storage) ListBlockingPopAndPush ¶
ListBlockingPopAndPush Blocks until an item is available, pops it from a list and pushes it to another times out after 10 minutes
func (*Storage) ListRemove ¶
ListRemove removes count of item from list
func (*Storage) ListUnshift ¶
ListUnshift prepends to list
func (*Storage) MoveSortedSetMemberUpdating ¶
func (s *Storage) MoveSortedSetMemberUpdating(fromKey string, toKey string, member string, newScore float64) error
MoveSortedSetMemberUpdating moves a sorted set member between sets and updates score
func (*Storage) SetHasMember ¶
func (*Storage) SetIfNotExists ¶
func (s *Storage) SetIfNotExists(key string, value interface{}, expiration time.Duration) (bool, error)
SetIfNotExists only sets if it doesn't exist
func (*Storage) SetMapField ¶
SetMapField sets a field of a redis hashmap
func (*Storage) SortedSetAdd ¶
SortedSetAdd adds a member with score to sorted set
func (*Storage) SortedSetCount ¶
SortedSetCount adds a member with score to sorted set
func (*Storage) SortedSetGetByScore ¶
func (s *Storage) SortedSetGetByScore(key string, min string, max string, limit int64) ([]string, error)
SortedSetGetByScore
func (*Storage) SortedSetRemove ¶
SortedSetRemove adds a member with score to sorted set
func (*Storage) SortedSetRemoveByScore ¶
SortedSetRemoveByScore
func (*Storage) SortedSetUpdate ¶
SortedSetUpdate only sets score if it exists
func (*Storage) SortedSetsCardSum ¶
SortedSetsCardSum returns the total number of elements in a list of sets