Initial revisin of healthchecker, inspired by HAProxy
This commit is contained in:
30
Makefile
Normal file
30
Makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
BINARY := healthchecker
|
||||
MODULE := git.ipng.ch/ipng/vpp-maglev
|
||||
PROTO_DIR := proto
|
||||
PROTO_FILE := $(PROTO_DIR)/healthchecker.proto
|
||||
GEN_FILES := internal/grpcapi/healthchecker.pb.go internal/grpcapi/healthchecker_grpc.pb.go
|
||||
|
||||
.PHONY: all build test proto lint clean
|
||||
|
||||
all: build
|
||||
|
||||
build: $(GEN_FILES)
|
||||
go build -o bin/$(BINARY) ./cmd/$(BINARY)/
|
||||
|
||||
test: $(GEN_FILES)
|
||||
go test ./...
|
||||
|
||||
proto: $(GEN_FILES)
|
||||
|
||||
$(GEN_FILES): $(PROTO_FILE)
|
||||
protoc \
|
||||
--go_out=. --go_opt=module=$(MODULE) \
|
||||
--go-grpc_out=. --go-grpc_opt=module=$(MODULE) \
|
||||
$(PROTO_FILE)
|
||||
|
||||
lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
clean:
|
||||
rm -f bin/$(BINARY)
|
||||
rm -f $(GEN_FILES)
|
||||
Reference in New Issue
Block a user