-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredis.go
56 lines (52 loc) · 1.36 KB
/
redis.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package redisson
import (
"context"
"github.com/sandwich-go/funnel"
"time"
)
type XCmdable interface {
SafeCmdable
RegisterCollector(RegisterCollectorFunc)
Cache(ttl time.Duration) CacheCmdable
NewLocker(opts ...LockerOption) (Locker, error)
NewFunnel(key string, capacity, operations int64, seconds time.Duration) funnel.Funnel
NewBloomFilter(name string, expectedNumberOfItems uint, falsePositiveRate float64, opts ...BloomOption) (BloomFilter, error)
NewDelayQueue(name string, f func([]byte) error, opts ...DelayOption) (DelayQueue, error)
Close() error
IsCluster() bool
Options() ConfVisitor
ForEachNodes(context.Context, func(context.Context, Cmdable) error) error
Receive(ctx context.Context, cb func(Message), channels ...string) error
PReceive(ctx context.Context, cb func(Message), patterns ...string) error
Do(ctx context.Context, completed Completed) RedisResult
}
type Cmdable interface {
XCmdable
CacheCmdable
BitmapCmdable
ClusterCmdable
ConnectionCmdable
GenericCmdable
GeospatialCmdable
HashCmdable
HyperLogCmdable
ListCmdable
ScriptCmdable
ServerCmdable
SetCmdable
SortedSetCmdable
StreamCmdable
StringCmdable
PubSubCmdable
PipelineCmdable
}
type CacheCmdable interface {
BitmapCacheCmdable
GenericCacheCmdable
GeospatialCacheCmdable
HashCacheCmdable
ListCacheCmdable
SetCacheCmdable
SortedSetCacheCmdable
StringCacheCmdable
}