add multi instance support

This commit is contained in:
2025-03-26 13:47:05 +01:00
parent 3dc275d7e3
commit 546b08039f
7 changed files with 170 additions and 73 deletions

View File

@@ -21,7 +21,7 @@ BUILDDIR := ${PREFIX}/build
DOCKER_IMAGE := $(docker images --format "{{.Repository}}" --filter=reference='$(PROJECTNAME):$(GITCOMMIT)')
GOOSARCHES := linux/amd64
all: build fmt lint test
all: build fmt test
.PHONY: fmt
fmt: ## Verifies all files have been `gofmt`ed.
@@ -30,13 +30,6 @@ fmt: ## Verifies all files have been `gofmt`ed.
@if [ ! -z "${var}" ]; then exit 1; fi
$(MAKE) -C client fmt
.PHONY: lint
lint: ## Verifies `golint` passes.
@echo "+ $@"
$(eval var = $(shell golint ./... | grep -v vendor | tee /dev/stderr))
@if [ ! -z "${var}" ]; then exit 1; fi
$(MAKE) -C client lint
.PHONY: tag
tag: ## Create a new git tag to prepare to build a release
git tag -sa $(VERSION) -m "$(VERSION)"
@@ -45,8 +38,8 @@ tag: ## Create a new git tag to prepare to build a release
.PHONY: test
test: ## Generates test certificates & run unit tests.
$(MAKE) -C fixtures/test
go vet -mod=vendor
go test -v -mod=vendor -coverprofile=coverage.out
go vet
go test -v -coverprofile=coverage.out
$(MAKE) -C client test
.PHONY: resetreplay
@@ -62,7 +55,7 @@ deb:
.PHONY: build
build: ## Builds a static executable.
@echo "+ $@"
CGO_ENABLED=0 $(GO) build -mod=vendor \
CGO_ENABLED=0 $(GO) build \
-o $(PROJECTNAME) \
-tags "static_build netgo" \
-trimpath \