Skip to content

Commit

Permalink
Ready to open source on github
Browse files Browse the repository at this point in the history
* Rename package abs path
* Remove pd-addrs in conf
  • Loading branch information
shafreeck committed Nov 14, 2018
1 parent 0ac2b3f commit 5c9842a
Show file tree
Hide file tree
Showing 35 changed files with 66 additions and 67 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ RUN apk add --no-cache \
make \
git

COPY . /go/src/gitlab.meitu.com/platform/titan
COPY . /go/src/github.com/meitu/titan

WORKDIR /go/src/gitlab.meitu.com/platform/titan
WORKDIR /go/src/github.com/meitu/titan

RUN env GOOS=linux CGO_ENABLED=0 go build ./bin/titan/

## Executable image
FROM scratch

COPY --from=builder /go/src/gitlab.meitu.com/platform/titan/titan /titan
COPY --from=builder /go/src/github.com/meitu/titan/titan /titan

WORKDIR /

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT_NAME := titan
PKG := gitlab.meitu.com/platform/$(PROJECT_NAME)
PKG := github.com/meitu/$(PROJECT_NAME)
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GITHASH := $(shell git rev-parse --short HEAD)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go)
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Titan [![build status](https://gitlab.meitu.com/platform/titan/badges/dev/build.svg)](https://gitlab.meitu.com/platform/titan/commits/dev) [![coverage report](https://gitlab.meitu.com/platform/titan/badges/dev/coverage.svg)](https://gitlab.meitu.com/platform/titan/commits/dev)
An distributed implementation of Redis compatible layer over TiKV
# Titan

Visit [Titan](http://cf.meitu.com/confluence/pages/viewpage.action?pageId=29745824) for more informations.
An distributed implementation of Redis compatible layer over TiKV

## Commands

Expand Down
10 changes: 5 additions & 5 deletions bin/titan/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"gitlab.meitu.com/platform/titan"
"gitlab.meitu.com/platform/titan/conf"
"gitlab.meitu.com/platform/titan/context"
"gitlab.meitu.com/platform/titan/db"
"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan"
"github.com/meitu/titan/conf"
"github.com/meitu/titan/context"
"github.com/meitu/titan/db"
"github.com/meitu/titan/metrics"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"
"time"

"gitlab.meitu.com/platform/titan/command"
"gitlab.meitu.com/platform/titan/context"
"gitlab.meitu.com/platform/titan/encoding/resp"
"github.com/meitu/titan/command"
"github.com/meitu/titan/context"
"github.com/meitu/titan/encoding/resp"
"go.uber.org/zap"
)

Expand Down
8 changes: 4 additions & 4 deletions command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"time"

"github.com/shafreeck/retry"
"gitlab.meitu.com/platform/titan/context"
"gitlab.meitu.com/platform/titan/db"
"gitlab.meitu.com/platform/titan/encoding/resp"
"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan/context"
"github.com/meitu/titan/db"
"github.com/meitu/titan/encoding/resp"
"github.com/meitu/titan/metrics"
"go.uber.org/zap"
)

Expand Down
4 changes: 2 additions & 2 deletions command/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package command
import (
"strconv"

"gitlab.meitu.com/platform/titan/encoding/resp"
"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan/encoding/resp"
"github.com/meitu/titan/metrics"
)

// Auth verifies the client
Expand Down
2 changes: 1 addition & 1 deletion command/hashes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"strconv"

"gitlab.meitu.com/platform/titan/db"
"github.com/meitu/titan/db"
)

// HDel removes the specified fields from the hash stored at key
Expand Down
4 changes: 2 additions & 2 deletions command/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"time"

"gitlab.meitu.com/platform/titan/db"
"gitlab.meitu.com/platform/titan/encoding/resp"
"github.com/meitu/titan/db"
"github.com/meitu/titan/encoding/resp"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion command/lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"gitlab.meitu.com/platform/titan/db"
"github.com/meitu/titan/db"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"strings"
"time"

"gitlab.meitu.com/platform/titan/context"
"gitlab.meitu.com/platform/titan/db"
"gitlab.meitu.com/platform/titan/encoding/resp"
"github.com/meitu/titan/context"
"github.com/meitu/titan/db"
"github.com/meitu/titan/encoding/resp"
)

const sysAdminNamespace = "$sys.admin"
Expand Down
4 changes: 2 additions & 2 deletions command/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"time"

"github.com/stretchr/testify/assert"
"gitlab.meitu.com/platform/titan/context"
"gitlab.meitu.com/platform/titan/db"
"github.com/meitu/titan/context"
"github.com/meitu/titan/db"
)

func TestInfo(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion command/sets.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package command

import (
"gitlab.meitu.com/platform/titan/db"
"github.com/meitu/titan/db"
)

// SAdd adds the specified members to the set stored at key
Expand Down
2 changes: 1 addition & 1 deletion command/strings.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"time"

"gitlab.meitu.com/platform/titan/db"
"github.com/meitu/titan/db"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions command/test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"io"
"strings"

"gitlab.meitu.com/platform/titan/conf"
"gitlab.meitu.com/platform/titan/context"
"gitlab.meitu.com/platform/titan/db"
"gitlab.meitu.com/platform/titan/db/store"
"github.com/meitu/titan/conf"
"github.com/meitu/titan/context"
"github.com/meitu/titan/db"
"github.com/meitu/titan/db/store"
)

var cfg = &conf.Tikv{
Expand Down
6 changes: 3 additions & 3 deletions command/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strings"
"time"

"gitlab.meitu.com/platform/titan/db"
"gitlab.meitu.com/platform/titan/encoding/resp"
"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan/db"
"github.com/meitu/titan/encoding/resp"
"github.com/meitu/titan/metrics"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion conf/titan.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ auth = ""
#rules: nonempty
#description: pd address in tidb
#required
pd-addrs = "tikv://172.16.201.74:2379"
pd-addrs = ""

[server.tikv.zt]

Expand Down
2 changes: 1 addition & 1 deletion context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"gitlab.meitu.com/platform/titan/db"
"github.com/meitu/titan/db"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (

"go.uber.org/zap"

"gitlab.meitu.com/platform/titan/conf"
"gitlab.meitu.com/platform/titan/db/store"
"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan/conf"
"github.com/meitu/titan/db/store"
"github.com/meitu/titan/metrics"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion db/expire.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"context"
"time"

"gitlab.meitu.com/platform/titan/db/store"
"github.com/meitu/titan/db/store"

"go.uber.org/zap"
)
Expand Down
4 changes: 2 additions & 2 deletions db/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"time"

"gitlab.meitu.com/platform/titan/db/store"
"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan/db/store"
"github.com/meitu/titan/metrics"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion db/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"math/rand"

"gitlab.meitu.com/platform/titan/db/store"
"github.com/meitu/titan/db/store"
)

// Kv supplies key releated operations
Expand Down
2 changes: 1 addition & 1 deletion db/llist.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math"
"time"

"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan/metrics"

"github.com/pingcap/tidb/kv"
)
Expand Down
2 changes: 1 addition & 1 deletion db/zlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"

"github.com/golang/protobuf/proto"
pb "gitlab.meitu.com/platform/titan/db/zlistproto"
pb "github.com/meitu/titan/db/zlistproto"
)

// GetZList generate List objectm with auto reation, if zip is true, zipped list will be choose
Expand Down
4 changes: 2 additions & 2 deletions db/ztransfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"time"

"gitlab.meitu.com/platform/titan/conf"
"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan/conf"
"github.com/meitu/titan/metrics"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion metrics/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"time"

"gitlab.meitu.com/platform/titan/conf"
"github.com/meitu/titan/conf"
)

//Server status server
Expand Down
2 changes: 1 addition & 1 deletion metrics/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/assert"

"gitlab.meitu.com/platform/titan/conf"
"github.com/meitu/titan/conf"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions titan.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"net"
"time"

"gitlab.meitu.com/platform/titan/command"
"gitlab.meitu.com/platform/titan/context"
"gitlab.meitu.com/platform/titan/metrics"
"github.com/meitu/titan/command"
"github.com/meitu/titan/context"
"github.com/meitu/titan/metrics"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion tools/autotest/abnormal.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/gomodule/redigo/redis"
"gitlab.meitu.com/platform/titan/tools/autotest/cmd"
"github.com/meitu/titan/tools/autotest/cmd"
)

//Abnormal check error message
Expand Down
2 changes: 1 addition & 1 deletion tools/autotest/auto.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"gitlab.meitu.com/platform/titan/tools/autotest/cmd"
"github.com/meitu/titan/tools/autotest/cmd"

"github.com/gomodule/redigo/redis"
)
Expand Down
2 changes: 1 addition & 1 deletion tools/autotest/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"gitlab.meitu.com/platform/titan/tools/integration"
"github.com/meitu/titan/tools/integration"
)

var (
Expand Down
8 changes: 4 additions & 4 deletions tools/integration/titan.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"go.uber.org/zap"

"gitlab.meitu.com/platform/titan"
"gitlab.meitu.com/platform/titan/conf"
"gitlab.meitu.com/platform/titan/context"
"gitlab.meitu.com/platform/titan/db"
"github.com/meitu/titan"
"github.com/meitu/titan/conf"
"github.com/meitu/titan/context"
"github.com/meitu/titan/db"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion tools/test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"flag"
"testing"

"gitlab.meitu.com/platform/titan/tools/autotest"
"github.com/meitu/titan/tools/autotest"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion tools/token/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

"gitlab.meitu.com/platform/titan/command"
"github.com/meitu/titan/command"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync/atomic"

"github.com/twinj/uuid"
"gitlab.meitu.com/platform/titan/context"
"github.com/meitu/titan/context"

"go.uber.org/zap"
)
Expand Down

0 comments on commit 5c9842a

Please sign in to comment.