-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
44 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,41 @@ | ||
PROJECT_NAME="vbalancer" | ||
|
||
.PHONY: all dep build test lint mocks | ||
|
||
all: lint test race build | ||
|
||
pre-push: lint test race | ||
pre-push: lint test race | ||
|
||
build-mocks: | ||
go get github.com/golang/mock/gomock | ||
go install github.com/golang/mock/mockgen | ||
|
||
go install github.com/golang/mock/[email protected] | ||
|
||
mocks: | ||
mockgen -destination=mocks/mock_peer.go -package=mocks -source=./internal/proxy/peer/peer.go Peer | ||
mockgen -destination=mocks/mock_vlog.go -package=mocks -source=./internal/vlog/vlog.go ILog | ||
|
||
init: | ||
init: | ||
go mod tidy | ||
go mod vendor | ||
|
||
fmt: | ||
go fmt ./... | ||
go fmt ./... | ||
|
||
lint: | ||
lint: | ||
go vet ./... | ||
golangci-lint run -v ./... | ||
|
||
test: | ||
test: | ||
go test -v ./... | ||
|
||
race: dep ## Run data race detector | ||
go test -race -v ./... | ||
|
||
build: | ||
build: | ||
go build -o build/$(PROJECT_NAME) cmd/$(PROJECT_NAME)/$(PROJECT_NAME).go | ||
|
||
docker-create: | ||
docker build --tag vbalancer . -f Dockerfile | ||
|
||
docker-run: | ||
docker run --restart=always -p 8080:8080 vbalancer | ||
docker run --restart=always -p 8080:8080 vbalancer | ||
|
||
docker-delete: | ||
docker rmi vbalancer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,8 @@ const ( | |
// | ||
DeafultCountMaxDialAttemptsToPeer = 30 | ||
) | ||
|
||
// ENVIREMENT. | ||
const ( | ||
ProxyPort = "ProxyPort" | ||
) |