Merge branch 'master' into cluster-resize

This commit is contained in:
Travis Turner 2018-02-06 10:06:15 -06:00
commit 2d5daaf78d
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
7 changed files with 26 additions and 7 deletions

View file

@ -6,7 +6,7 @@ COPY . /go/src/github.com/pilosa/pilosa
RUN cd /go/src/github.com/pilosa/pilosa \
&& make vendor \
&& CGO_ENABLED=0 go install -a -ldflags "$ldflags" github.com/pilosa/pilosa/cmd/pilosa
&& CGO_ENABLED=0 go install -tags release -a -ldflags "$ldflags" github.com/pilosa/pilosa/cmd/pilosa
FROM scratch

View file

@ -53,7 +53,7 @@ cover-viz: cover
go tool cover -html=build/coverage/all.out
pilosa: vendor
go build -ldflags $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa
go build -tags release -ldflags $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa
release-build: vendor
ifdef DOCKER_BUILD
@ -114,7 +114,7 @@ docker:
@echo "Created image: pilosa:$(VERSION)"
docker-build:
docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) -e GOOS=$(GOOS) -e GOARCH=$(GOARCH) $(DOCKER_GOLANG_IMAGE) go build -ldflags $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa
docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) -e GOOS=$(GOOS) -e GOARCH=$(GOARCH) $(DOCKER_GOLANG_IMAGE) go build -tags release -ldflags $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa
docker-test:
docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) $(DOCKER_GOLANG_IMAGE) go test $(TESTFLAGS) $(PKGS)

View file

@ -20,6 +20,7 @@
- [Get Support](#get-support)
- [Contributing](#contributing)
Want to contribute? One of the easiest ways is to [tell us how you're using (or want to use) Pilosa](https://github.com/pilosa/pilosa/issues/1074). We learn from every discussion!
## Docs

10
server/default.go Normal file
View file

@ -0,0 +1,10 @@
// +build !release
//
// This file sets defaults to be overridden by release.go
package server
import "time"
// DefaultDiagnosticsInterval is the default sync frequency diagnostic metrics. A value of 0 disables diagnostics.
const DefaultDiagnosticsInterval = time.Duration(0)

10
server/release.go Normal file
View file

@ -0,0 +1,10 @@
// +build release
//
// This file sets release-specific variables.
package server
import "time"
// DefaultDiagnosticsInterval is the default sync frequency diagnostic metrics.
const DefaultDiagnosticsInterval = 1 * time.Hour

View file

@ -41,8 +41,8 @@ func init() {
}
const (
// DefaultDiagnosticsInterval is the default sync frequency diagnostic metrics.
DefaultDiagnosticsInterval = 1 * time.Hour
// DefaultDataDir is the default data directory.
DefaultDataDir = "~/.pilosa"
)
// Command represents the state of the pilosa server command.

View file

@ -124,8 +124,6 @@ func (m *Main) RunWithTransport(host string, bindPort int, joinSeed string, coor
}
// Open server listener.
// This is used to set Server.Name, which is used as the node
// name for identifying a memberlist node.
err = m.Server.OpenListener()
if err != nil {
return seed, coord, err