mirror of https://github.com/ledisdb/ledisdb.git
Fix gomod (#379)
This commit is contained in:
parent
1b73a3d5bb
commit
4c786878af
|
@ -3,8 +3,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
)
|
)
|
||||||
|
|
||||||
var configPath = flag.String("config", "", "ledisdb config file")
|
var configPath = flag.String("config", "", "ledisdb config file")
|
||||||
|
|
|
@ -3,8 +3,8 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
var fileName = flag.String("config", "", "ledisdb config file")
|
var fileName = flag.String("config", "", "ledisdb config file")
|
||||||
|
|
|
@ -12,8 +12,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/server"
|
"github.com/ledisdb/ledisdb/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
var configFile = flag.String("config", "", "ledisdb config file")
|
var configFile = flag.String("config", "", "ledisdb config file")
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/siddontang/ledisdb
|
module github.com/ledisdb/ledisdb
|
||||||
|
|
||||||
go 1.12
|
go 1.12
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ package ledis
|
||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/rpl"
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/ledisdb/rpl"
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type batch struct {
|
type batch struct {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/snappy"
|
"github.com/siddontang/go/snappy"
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// DumpHead is the head of a dump.
|
// DumpHead is the head of a dump.
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDump(t *testing.T) {
|
func TestDump(t *testing.T) {
|
||||||
|
|
|
@ -8,11 +8,11 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
|
"github.com/ledisdb/ledisdb/rpl"
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/filelock"
|
"github.com/siddontang/go/filelock"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
"github.com/siddontang/ledisdb/rpl"
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ledis is the core structure to handle the database.
|
// Ledis is the core structure to handle the database.
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ibucket interface {
|
type ibucket interface {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
var testLedis *Ledis
|
var testLedis *Ledis
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMigrate(t *testing.T) {
|
func TestMigrate(t *testing.T) {
|
||||||
|
|
|
@ -6,10 +6,10 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/rpl"
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/go/snappy"
|
"github.com/siddontang/go/snappy"
|
||||||
"github.com/siddontang/ledisdb/rpl"
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
func checkLedisEqual(master *Ledis, slave *Ledis) error {
|
func checkLedisEqual(master *Ledis, slave *Ledis) error {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errDataType = errors.New("error data type")
|
var errDataType = errors.New("error data type")
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Limit is for sort.
|
// Limit is for sort.
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// FVPair is the pair of field and value.
|
// FVPair is the pair of field and value.
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// KVPair is the pair of key-value.
|
// KVPair is the pair of key-value.
|
||||||
|
|
|
@ -7,10 +7,10 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var errSetKey = errors.New("invalid set key")
|
var errSetKey = errors.New("invalid set key")
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// For zset const.
|
// For zset const.
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -8,9 +8,9 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -38,7 +38,7 @@ const (
|
||||||
meta: log1 offset | log2 offset
|
meta: log1 offset | log2 offset
|
||||||
log offset: bigendian uint32 | bigendian uint32
|
log offset: bigendian uint32 | bigendian uint32
|
||||||
|
|
||||||
//sha1 of github.com/siddontang/ledisdb 20 bytes
|
//sha1 of github.com/ledisdb/ledisdb 20 bytes
|
||||||
magic data = "\x1c\x1d\xb8\x88\xff\x9e\x45\x55\x40\xf0\x4c\xda\xe0\xce\x47\xde\x65\x48\x71\x17"
|
magic data = "\x1c\x1d\xb8\x88\xff\x9e\x45\x55\x40\xf0\x4c\xda\xe0\xce\x47\xde\x65\x48\x71\x17"
|
||||||
|
|
||||||
we must guarantee that the log id is monotonic increment strictly.
|
we must guarantee that the log id is monotonic increment strictly.
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type GoLevelDBStore struct {
|
type GoLevelDBStore struct {
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/go/snappy"
|
"github.com/siddontang/go/snappy"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Stat struct {
|
type Stat struct {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestReplication(t *testing.T) {
|
func TestReplication(t *testing.T) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGoLevelDBStore(t *testing.T) {
|
func TestGoLevelDBStore(t *testing.T) {
|
||||||
|
|
|
@ -11,9 +11,10 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/goredis"
|
"github.com/siddontang/goredis"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type App struct {
|
type App struct {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/goredis"
|
"github.com/siddontang/goredis"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var testAppOnce sync.Once
|
var testAppOnce sync.Once
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/sync2"
|
"github.com/siddontang/go/sync2"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type responseWriter interface {
|
type responseWriter interface {
|
||||||
|
|
|
@ -8,10 +8,10 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/bson"
|
"github.com/siddontang/go/bson"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
"github.com/ugorji/go/codec"
|
"github.com/ugorji/go/codec"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/goredis"
|
"github.com/siddontang/goredis"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var errReadRequest = errors.New("invalid request protocol")
|
var errReadRequest = errors.New("invalid request protocol")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
)
|
)
|
||||||
|
|
||||||
func hsetCommand(c *client) error {
|
func hsetCommand(c *client) error {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package server
|
||||||
import (
|
import (
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
)
|
)
|
||||||
|
|
||||||
// func getCommand(c *client) error {
|
// func getCommand(c *client) error {
|
||||||
|
|
|
@ -5,8 +5,9 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func lpushCommand(c *client) error {
|
func lpushCommand(c *client) error {
|
||||||
|
|
|
@ -7,10 +7,10 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/goredis"
|
"github.com/siddontang/goredis"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func dumpCommand(c *client) error {
|
func dumpCommand(c *client) error {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/goredis"
|
"github.com/siddontang/goredis"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDumpRestore(t *testing.T) {
|
func TestDumpRestore(t *testing.T) {
|
||||||
|
|
|
@ -8,9 +8,9 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func slaveofCommand(c *client) error {
|
func slaveofCommand(c *client) error {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/goredis"
|
"github.com/siddontang/goredis"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func checkDataEqual(master *App, slave *App) error {
|
func checkDataEqual(master *App, slave *App) error {
|
||||||
|
|
|
@ -6,9 +6,9 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseXScanArgs(args [][]byte) (cursor []byte, match string, count int, desc bool, err error) {
|
func parseXScanArgs(args [][]byte) (cursor []byte, match string, count int, desc bool, err error) {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/goredis"
|
"github.com/siddontang/goredis"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestScan(t *testing.T) {
|
func TestScan(t *testing.T) {
|
||||||
|
|
|
@ -4,10 +4,11 @@ import (
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
func pingCommand(c *client) error {
|
func pingCommand(c *client) error {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
)
|
)
|
||||||
|
|
||||||
func saddCommand(c *client) error {
|
func saddCommand(c *client) error {
|
||||||
|
|
|
@ -6,10 +6,10 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
|
"github.com/ledisdb/ledisdb/store"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
"github.com/siddontang/ledisdb/store"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//for simple implementation, we only support int64 score
|
//for simple implementation, we only support int64 score
|
||||||
|
|
|
@ -3,7 +3,7 @@ package server
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/sync2"
|
"github.com/siddontang/go/sync2"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type info struct {
|
type info struct {
|
||||||
|
|
|
@ -11,12 +11,12 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
|
"github.com/ledisdb/ledisdb/rpl"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/go/sync2"
|
"github.com/siddontang/go/sync2"
|
||||||
"github.com/siddontang/goredis"
|
"github.com/siddontang/goredis"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
|
||||||
"github.com/siddontang/ledisdb/rpl"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -8,10 +8,10 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/go/hack"
|
"github.com/siddontang/go/hack"
|
||||||
"github.com/siddontang/go/num"
|
"github.com/siddontang/go/num"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
lua "github.com/yuin/gopher-lua"
|
||||||
"github.com/yuin/gopher-lua"
|
|
||||||
|
|
||||||
luajson "github.com/glendc/gopher-json"
|
luajson "github.com/glendc/gopher-json"
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,8 +3,8 @@ package server
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/yuin/gopher-lua"
|
lua "github.com/yuin/gopher-lua"
|
||||||
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/go/log"
|
"github.com/siddontang/go/log"
|
||||||
"github.com/siddontang/ledisdb/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type testSnapshotDumper struct {
|
type testSnapshotDumper struct {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DB struct {
|
type DB struct {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package driver
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Store interface {
|
type Store interface {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"github.com/syndtr/goleveldb/leveldb/storage"
|
"github.com/syndtr/goleveldb/leveldb/storage"
|
||||||
"github.com/syndtr/goleveldb/leveldb/util"
|
"github.com/syndtr/goleveldb/leveldb/util"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
|
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package goleveldb
|
package goleveldb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package store
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultFilterBits int = 10
|
const defaultFilterBits int = 10
|
||||||
|
|
|
@ -7,7 +7,7 @@ package leveldb
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Snapshot struct {
|
type Snapshot struct {
|
||||||
|
|
|
@ -16,8 +16,8 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
const defaultFilterBits int = 10
|
const defaultFilterBits int = 10
|
||||||
|
|
|
@ -7,7 +7,7 @@ package rocksdb
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Snapshot struct {
|
type Snapshot struct {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package store
|
package store
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Slice interface {
|
type Slice interface {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package store
|
package store
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Snapshot struct {
|
type Snapshot struct {
|
||||||
|
|
|
@ -5,12 +5,12 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
|
|
||||||
_ "github.com/siddontang/ledisdb/store/goleveldb"
|
_ "github.com/ledisdb/ledisdb/store/goleveldb"
|
||||||
_ "github.com/siddontang/ledisdb/store/leveldb"
|
_ "github.com/ledisdb/ledisdb/store/leveldb"
|
||||||
_ "github.com/siddontang/ledisdb/store/rocksdb"
|
_ "github.com/ledisdb/ledisdb/store/rocksdb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getStorePath(cfg *config.Config) string {
|
func getStorePath(cfg *config.Config) string {
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStore(t *testing.T) {
|
func TestStore(t *testing.T) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package store
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/store/driver"
|
"github.com/ledisdb/ledisdb/store/driver"
|
||||||
"github.com/syndtr/goleveldb/leveldb"
|
"github.com/syndtr/goleveldb/leveldb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/siddontang/ledisdb/config"
|
"github.com/ledisdb/ledisdb/config"
|
||||||
"github.com/siddontang/ledisdb/ledis"
|
"github.com/ledisdb/ledisdb/ledis"
|
||||||
"github.com/siddontang/ledisdb/store"
|
"github.com/ledisdb/ledisdb/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
var configPath = flag.String("config", "", "ledisdb config file")
|
var configPath = flag.String("config", "", "ledisdb config file")
|
||||||
|
|
Loading…
Reference in New Issue