Skip to content

Commit de1a43b

Browse files
author
ZHAO
committed
merge master
2 parents f5f7ed3 + e75841f commit de1a43b

File tree

8 files changed

+39
-24
lines changed

8 files changed

+39
-24
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.log
55
unittest.xml
66
venv/
7+
vendor/
78
.idea/
89
main
9-
go.sum
10+
vendor/

.travis.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@ os:
55
- osx
66

77
go:
8-
- "1.10"
9-
- master
8+
- "1.11.x"
9+
- "1.12.x"
10+
- "1.13.x"
11+
12+
env:
13+
- GO111MODULE=on
1014

1115
before_install:
1216
- pip install --user -r tests/pip-req.txt
1317

1418
install:
15-
- go get -u golang.org/x/vgo
1619
- go get -u golang.org/x/tools/cmd/goimports
17-
- go get -u github.com/douban/gobeansdb
1820

1921
script:
2022
- diff <(goimports -d .) <(printf "")
23+
- make install
24+
- go get -u github.com/douban/gobeansdb
2125
- make test

Makefile

+4-14
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,11 @@ all:install
22

33
export PYTHONPATH=.
44

5-
# FIXME: When this issue is done(https://github.com/golang/go/issues/23965#issuecomment-409232583)
6-
# Determine the compiler and version
7-
COMPILER_HELP := $(shell $(CC) --help | head -n 1)
8-
ifneq (,$(findstring clang,$(COMPILER_HELP)))
9-
COMPILER = clang
10-
else ifneq (,$(findstring gcc,$(COMPILER_HELP)))
11-
COMPILER = gcc
12-
else
13-
COMPILER = unknown
14-
endif
15-
165
test:
176
./misc/gobeansdb_server.sh start
187
go version
19-
vgo test github.com/douban/gobeansproxy/config
20-
vgo test github.com/douban/gobeansproxy/dstore
8+
go test github.com/douban/gobeansproxy/config
9+
go test github.com/douban/gobeansproxy/dstore
2110
./misc/gobeansdb_server.sh stop
2211

2312
template:
@@ -28,4 +17,5 @@ pytest:install
2817
./tests/run_test.sh
2918

3019
install:
31-
CC=$(COMPILER) vgo install ./
20+
GO111MODULE=on go mod vendor
21+
go install ./

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ A proxy for [Gobeansdb](https://github.com/douban/gobeansdb).
44

55
## Prepare
66

7-
GoBeansProxy use `vgo` manage dependencies, please install [vgo](https://godoc.org/golang.org/x/vgo) first.
8-
Supported Go version: 1.10.1+
7+
Supported Go version: > 1.11.0
98

109
## Install
1110

@@ -24,5 +23,9 @@ $ make test # unit test
2423
## run
2524

2625
```
26+
# Run with conf
27+
$ ${GOPATH}/bin/proxy -confdir pathToConfDir
28+
29+
# Others
2730
$ ${GOPATH}/bin/proxy -h
2831
```

config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
const (
12-
Version = "1.0.0.8"
12+
Version = "v1.0.2"
1313
)
1414

1515
var (

dstore/scheduler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func (sch *ManualScheduler) checkFailsForBucket(bucket *Bucket) {
255255
} else {
256256
logger.Infof(
257257
"beansdb server %s in Bucket %X's Down while check fails , err is %s",
258-
hostBucket.host.Addr, bucket, err)
258+
hostBucket.host.Addr, bucket.ID, err)
259259
}
260260
}
261261
}

go.mod

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ module github.com/douban/gobeansproxy
22

33
require (
44
github.com/davecgh/go-spew v1.1.0 // indirect
5-
github.com/douban/gobeansdb v1.0.1
5+
github.com/douban/gobeansdb v1.1.0
66
github.com/pmezard/go-difflib v1.0.0 // indirect
77
github.com/stretchr/testify v1.2.2
88
gopkg.in/yaml.v2 v2.2.1
99
)
10+
11+
go 1.13

go.sum

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3+
github.com/douban/gobeansdb v1.1.0 h1:Ia659+3inop0LFeS8/aLFM7mEcJ0hdX0fcIGrZC1aDw=
4+
github.com/douban/gobeansdb v1.1.0/go.mod h1:1Irour4eUljC+P/4aD6qI1z9zWao4IzQYJmfuRqcH7o=
5+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
6+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7+
github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec h1:6ncX5ko6B9LntYM0YBRXkiSaZMmLYeZ/NWcmeB43mMY=
8+
github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
9+
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
10+
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
11+
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
12+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
13+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
14+
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
15+
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 commit comments

Comments
 (0)