Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
ZHAO committed Oct 12, 2019
2 parents f5f7ed3 + e75841f commit de1a43b
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.log
unittest.xml
venv/
vendor/
.idea/
main
go.sum
vendor/
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ os:
- osx

go:
- "1.10"
- master
- "1.11.x"
- "1.12.x"
- "1.13.x"

env:
- GO111MODULE=on

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

install:
- go get -u golang.org/x/vgo
- go get -u golang.org/x/tools/cmd/goimports
- go get -u github.com/douban/gobeansdb

script:
- diff <(goimports -d .) <(printf "")
- make install
- go get -u github.com/douban/gobeansdb
- make test
18 changes: 4 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,11 @@ all:install

export PYTHONPATH=.

# FIXME: When this issue is done(https://github.com/golang/go/issues/23965#issuecomment-409232583)
# Determine the compiler and version
COMPILER_HELP := $(shell $(CC) --help | head -n 1)
ifneq (,$(findstring clang,$(COMPILER_HELP)))
COMPILER = clang
else ifneq (,$(findstring gcc,$(COMPILER_HELP)))
COMPILER = gcc
else
COMPILER = unknown
endif

test:
./misc/gobeansdb_server.sh start
go version
vgo test github.com/douban/gobeansproxy/config
vgo test github.com/douban/gobeansproxy/dstore
go test github.com/douban/gobeansproxy/config
go test github.com/douban/gobeansproxy/dstore
./misc/gobeansdb_server.sh stop

template:
Expand All @@ -28,4 +17,5 @@ pytest:install
./tests/run_test.sh

install:
CC=$(COMPILER) vgo install ./
GO111MODULE=on go mod vendor
go install ./
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ A proxy for [Gobeansdb](https://github.com/douban/gobeansdb).

## Prepare

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

## Install

Expand All @@ -24,5 +23,9 @@ $ make test # unit test
## run

```
# Run with conf
$ ${GOPATH}/bin/proxy -confdir pathToConfDir
# Others
$ ${GOPATH}/bin/proxy -h
```
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

const (
Version = "1.0.0.8"
Version = "v1.0.2"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion dstore/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (sch *ManualScheduler) checkFailsForBucket(bucket *Bucket) {
} else {
logger.Infof(
"beansdb server %s in Bucket %X's Down while check fails , err is %s",
hostBucket.host.Addr, bucket, err)
hostBucket.host.Addr, bucket.ID, err)
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ module github.com/douban/gobeansproxy

require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/douban/gobeansdb v1.0.1
github.com/douban/gobeansdb v1.1.0
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2
gopkg.in/yaml.v2 v2.2.1
)

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

0 comments on commit de1a43b

Please sign in to comment.