File tree 12 files changed +27
-27
lines changed
12 files changed +27
-27
lines changed Original file line number Diff line number Diff line change 1
1
.goat
2
2
* .test
3
3
* .prof
4
- redeque
4
+ okq
Original file line number Diff line number Diff line change 1
1
---
2
- path : github.com/mc0/redeque
2
+ path : github.com/mc0/okq
3
3
deps :
4
4
- loc : github.com/fzzy/radix/redis
5
5
- loc : github.com/mediocregopher/flagconfig
Original file line number Diff line number Diff line change 1
- Redeque
1
+ okQ
2
2
=======
3
3
4
4
A simple go-based reliable event queueing with at-least-once support.
@@ -9,7 +9,7 @@ This allows swapping connecting directly to the service from any redis client.
9
9
Commands
10
10
--------
11
11
12
- Redeque is modeled as a left-to-right queue. Clients submit jobs on the left
12
+ OkQ is modeled as a left-to-right queue. Clients submit jobs on the left
13
13
side of the queue (with ` QLPUSH ` , and consumers read off the right side (with
14
14
` QRPOP ` ).
15
15
Original file line number Diff line number Diff line change 4
4
"github.com/mediocregopher/pubsubch"
5
5
"time"
6
6
7
- "github.com/mc0/redeque /config"
8
- "github.com/mc0/redeque /db"
9
- "github.com/mc0/redeque /log"
7
+ "github.com/mc0/okq /config"
8
+ "github.com/mc0/okq /db"
9
+ "github.com/mc0/okq /log"
10
10
)
11
11
12
12
// consumers are clients which have qregistered themselves as consuming some set
Original file line number Diff line number Diff line change 7
7
. "testing"
8
8
"time"
9
9
10
- "github.com/mc0/redeque /db"
10
+ "github.com/mc0/okq /db"
11
11
)
12
12
13
13
func TestUpdateQueues (t * T ) {
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import (
10
10
"strings"
11
11
"time"
12
12
13
- "github.com/mc0/redeque /clients"
14
- "github.com/mc0/redeque /db"
13
+ "github.com/mc0/okq /clients"
14
+ "github.com/mc0/okq /db"
15
15
)
16
16
17
17
var commandMap = map [string ]func (* clients.Client , []string ) error {
Original file line number Diff line number Diff line change 9
9
. "testing"
10
10
"time"
11
11
12
- "github.com/mc0/redeque /clients"
12
+ "github.com/mc0/okq /clients"
13
13
)
14
14
15
15
func readAndAssertStr (t * T , client * clients.Client , expected string ) {
Original file line number Diff line number Diff line change 9
9
"github.com/fzzy/radix/redis"
10
10
"strings"
11
11
12
- "github.com/mc0/redeque /config"
13
- "github.com/mc0/redeque /log"
12
+ "github.com/mc0/okq /config"
13
+ "github.com/mc0/okq /log"
14
14
)
15
15
16
16
// A pool of redis connections which can be read from asynchronously by anyone
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package db
2
2
3
3
import (
4
4
"github.com/fzzy/radix/redis"
5
- "github.com/mc0/redeque /log"
5
+ "github.com/mc0/okq /log"
6
6
)
7
7
8
8
type ScanResult struct {
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ import (
8
8
"os"
9
9
"strings"
10
10
11
- "github.com/mc0/redeque /config"
11
+ "github.com/mc0/okq /config"
12
12
)
13
13
14
- type RedequeLogger struct {
14
+ type OkQLogger struct {
15
15
* log.Logger
16
16
}
17
17
@@ -20,7 +20,7 @@ const defaultFlags = log.LstdFlags
20
20
// This is what all logging methods should be called on. We leave this public
21
21
// and don't make wrappers around it so that the Lshortfile flag will work
22
22
// (prints out file and line number of logs)
23
- var L RedequeLogger
23
+ var L OkQLogger
24
24
25
25
func init () {
26
26
var flags int
@@ -29,18 +29,18 @@ func init() {
29
29
} else {
30
30
flags = log .LstdFlags
31
31
}
32
- L = RedequeLogger {log .New (os .Stdout , "" , flags )}
32
+ L = OkQLogger {log .New (os .Stdout , "" , flags )}
33
33
}
34
34
35
- func (l * RedequeLogger ) Debug (v ... interface {}) {
35
+ func (l * OkQLogger ) Debug (v ... interface {}) {
36
36
if config .Debug {
37
37
format := strings .Repeat ("%s" , len (v ))
38
38
s := fmt .Sprintf (format , v ... )
39
39
l .Output (2 , s )
40
40
}
41
41
}
42
42
43
- func (l * RedequeLogger ) Debugf (format string , args ... interface {}) {
43
+ func (l * OkQLogger ) Debugf (format string , args ... interface {}) {
44
44
if config .Debug {
45
45
s := fmt .Sprintf (format , args ... )
46
46
l .Output (2 , s )
Original file line number Diff line number Diff line change 7
7
"github.com/fzzy/radix/redis"
8
8
"time"
9
9
10
- "github.com/mc0/redeque /db"
11
- "github.com/mc0/redeque /log"
10
+ "github.com/mc0/okq /db"
11
+ "github.com/mc0/okq /log"
12
12
)
13
13
14
14
func init () {
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ import (
7
7
"net"
8
8
"strings"
9
9
10
- "github.com/mc0/redeque /clients"
11
- "github.com/mc0/redeque /commands"
12
- "github.com/mc0/redeque /config"
13
- "github.com/mc0/redeque /log"
14
- _ "github.com/mc0/redeque /restore"
10
+ "github.com/mc0/okq /clients"
11
+ "github.com/mc0/okq /commands"
12
+ "github.com/mc0/okq /config"
13
+ "github.com/mc0/okq /log"
14
+ _ "github.com/mc0/okq /restore"
15
15
)
16
16
17
17
func main () {
You can’t perform that action at this time.
0 commit comments