Documentation
¶
Index ¶
- Constants
- type DB
- type Indexer
- type LedisEmbeddedDB
- func (l *LedisEmbeddedDB) Hclear(key string) (int64, error)
- func (l *LedisEmbeddedDB) Hmget(key string, fields ...string) ([]string, error)
- func (l *LedisEmbeddedDB) Hset(key, field, value string) (int64, error)
- func (l *LedisEmbeddedDB) Sadd(key string, members ...string) (int64, error)
- func (l *LedisEmbeddedDB) Sclear(key string) (int64, error)
- func (l *LedisEmbeddedDB) Smembers(key string) ([]string, error)
- func (l *LedisEmbeddedDB) Zadd(key string, pairs ...ScorePair) error
- func (l *LedisEmbeddedDB) Zclear(key string) (int64, error)
- func (l *LedisEmbeddedDB) Zexpire(key string, duration int64) (int64, error)
- func (l *LedisEmbeddedDB) Zinterstore(destKey string, srcKeys []string, aggregate byte) (int64, error)
- func (l *LedisEmbeddedDB) Zkeyexists(key string) (bool, error)
- func (l *LedisEmbeddedDB) Zrange(key string, start int, stop int) ([]ScorePair, error)
- func (l *LedisEmbeddedDB) Zrem(key string, members ...string) error
- type ScorePair
- type Searcher
Constants ¶
View Source
const ( AggregateSum byte = 0 AggregateMin byte = 1 AggregateMax byte = 2 )
View Source
const ( DefaultNamespace = "gomate-index" IdSetSuffix = "all-ids" KeyChainSuffix = "all-keys" )
View Source
const ( KindSet = "S-" KindZSet = "Z-" KindHash = "H-" )
View Source
const CacheTimeOut = 600
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface {
Zadd(key string, pairs ...ScorePair) error
Zrem(key string, members ...string) error
Zrange(key string, start int, stop int) ([]ScorePair, error)
Zinterstore(destKey string, srcKeys []string, aggregate byte) (int64, error)
Zclear(key string) (int64, error)
Zkeyexists(key string) (bool, error)
Zexpire(key string, duration int64) (int64, error)
Sadd(key string, member ...string) (int64, error)
Smembers(key string) ([]string, error)
Sclear(key string) (int64, error)
Hset(key, field, value string) (int64, error)
Hmget(key string, fields ...string) ([]string, error)
Hclear(key string) (int64, error)
}
func NewLedisEmbeddedDB ¶
type Indexer ¶
type Indexer interface {
Index(id string, doc string) error
Remove(ids ...string) error
Clear() error
}
func NewIndexer ¶
type LedisEmbeddedDB ¶
type LedisEmbeddedDB struct {
// contains filtered or unexported fields
}
func (*LedisEmbeddedDB) Hmget ¶
func (l *LedisEmbeddedDB) Hmget(key string, fields ...string) ([]string, error)
func (*LedisEmbeddedDB) Hset ¶
func (l *LedisEmbeddedDB) Hset(key, field, value string) (int64, error)
func (*LedisEmbeddedDB) Sadd ¶
func (l *LedisEmbeddedDB) Sadd(key string, members ...string) (int64, error)
func (*LedisEmbeddedDB) Zexpire ¶
func (l *LedisEmbeddedDB) Zexpire(key string, duration int64) (int64, error)
func (*LedisEmbeddedDB) Zinterstore ¶
func (*LedisEmbeddedDB) Zkeyexists ¶
func (l *LedisEmbeddedDB) Zkeyexists(key string) (bool, error)
Click to show internal directories.
Click to hide internal directories.