forked from adjust/redismq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
key_names.go
48 lines (37 loc) · 1.12 KB
/
key_names.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
package redismq
func masterQueueKey() string {
return "redismq::queues"
}
func queueWorkersKey(queue string) string {
return queue + "::workers"
}
func queueInputKey(queue string) string {
return "redismq::" + queue
}
func queueFailedKey(queue string) string {
return "redismq::" + queue + "::failed"
}
func queueInputRateKey(queue string) string {
return queueInputKey(queue) + "::rate"
}
func queueInputSizeKey(queue string) string {
return queueInputKey(queue) + "::size"
}
func queueFailedSizeKey(queue string) string {
return queueFailedKey(queue) + "::size"
}
func queueHeartbeatKey(queue string) string {
return queueInputKey(queue) + "::buffered::heartbeat"
}
func queueWorkingPrefix(queue string) string {
return "redismq::" + queue + "::working"
}
func consumerWorkingQueueKey(queue, consumer string) string {
return queueWorkingPrefix(queue) + "::" + consumer
}
func consumerWorkingRateKey(queue, consumer string) string {
return consumerWorkingQueueKey(queue, consumer) + "::rate"
}
func consumerHeartbeatKey(queue, consumer string) string {
return consumerWorkingQueueKey(queue, consumer) + "::heartbeat"
}