rename package

This commit is contained in:
siddontang 2014-09-24 09:46:36 +08:00
parent eb77615b4b
commit 7d1f13f9d7
14 changed files with 34 additions and 18 deletions

View File

@ -2,9 +2,6 @@
. ./dev.sh
go get github.com/siddontang/go-log/log
go get github.com/siddontang/go-snappy/snappy
go get github.com/siddontang/goleveldb/leveldb
go get github.com/szferi/gomdb
@ -14,6 +11,8 @@ go get github.com/boltdb/bolt
go get github.com/ugorji/go/codec
go get github.com/BurntSushi/toml
go get github.com/siddontang/go-bson/bson
go get github.com/siddontang/go/bson
go get github.com/siddontang/go/log
go get github.com/siddontang/go/snappy
go get github.com/siddontang/go/num

View File

@ -1,7 +1,7 @@
package ledis
import (
"github.com/siddontang/go-log/log"
"github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/rpl"
"github.com/siddontang/ledisdb/store"
"sync"

View File

@ -4,7 +4,7 @@ import (
"bufio"
"bytes"
"encoding/binary"
"github.com/siddontang/go-snappy/snappy"
"github.com/siddontang/go/snappy"
"github.com/siddontang/ledisdb/store"
"io"
"os"

View File

@ -2,7 +2,7 @@ package ledis
import (
"fmt"
"github.com/siddontang/go-log/log"
"github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/config"
"github.com/siddontang/ledisdb/rpl"
"github.com/siddontang/ledisdb/store"

View File

@ -3,7 +3,7 @@ package ledis
import (
"bytes"
"errors"
"github.com/siddontang/go-log/log"
"github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/rpl"
"io"
"time"

View File

@ -110,6 +110,10 @@ func StrPutInt64(v int64) []byte {
return strconv.AppendInt(nil, v, 10)
}
func StrPutUint64(v uint64) []byte {
return strconv.AppendUint(nil, v, 10)
}
func MinUInt32(a uint32, b uint32) uint32 {
if a > b {
return b

View File

@ -2,7 +2,7 @@ package rpl
import (
"fmt"
"github.com/siddontang/go-log/log"
"github.com/siddontang/go/log"
"io/ioutil"
"os"
"path"

View File

@ -2,7 +2,7 @@ package rpl
import (
"encoding/binary"
"github.com/siddontang/go-log/log"
"github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/config"
"os"
"path"

View File

@ -1,7 +1,7 @@
package server
import (
"github.com/siddontang/go-log/log"
"github.com/siddontang/go/log"
)
const (

View File

@ -3,8 +3,8 @@ package server
import (
"encoding/json"
"fmt"
"github.com/siddontang/go-bson/bson"
"github.com/siddontang/go-log/log"
"github.com/siddontang/go/bson"
"github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/ledis"
"github.com/ugorji/go/codec"
"io"

View File

@ -3,7 +3,7 @@ package server
import (
"bufio"
"errors"
"github.com/siddontang/go-log/log"
"github.com/siddontang/go/log"
"github.com/siddontang/ledisdb/ledis"
"io"
"net"

View File

@ -2,7 +2,7 @@ package server
import (
"fmt"
"github.com/siddontang/go-snappy/snappy"
"github.com/siddontang/go/snappy"
"github.com/siddontang/ledisdb/ledis"
"io/ioutil"
"os"

View File

@ -150,9 +150,22 @@ func (i *info) dumpReplication(buf *bytes.Buffer) {
buf.WriteString("# Replication\r\n")
p := []infoPair{}
slaves := make([]string, 0, len(i.app.slaves))
for s, _ := range i.app.slaves {
p = append(p, infoPair{"slave", s.remoteAddr})
slaves = append(slaves, s.remoteAddr)
}
p = append(p, infoPair{"readonly", i.app.ldb.IsReadOnly()})
if len(slaves) > 0 {
p = append(p, infoPair{"slave", strings.Join(slaves, ",")})
}
s, _ := i.app.ldb.ReplicationStat()
p = append(p, infoPair{"last_log_id", s.LastID})
p = append(p, infoPair{"first_log_id", s.FirstID})
p = append(p, infoPair{"commit_log_id", s.CommitID})
i.dumpPairs(buf, p...)
}

View File

@ -5,8 +5,8 @@ import (
"bytes"
"errors"
"fmt"
"github.com/siddontang/go-log/log"
"github.com/siddontang/go-snappy/snappy"
"github.com/siddontang/go/log"
"github.com/siddontang/go/snappy"
"github.com/siddontang/ledisdb/ledis"
"github.com/siddontang/ledisdb/rpl"
"net"