-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (34 loc) · 1.07 KB
/
Copy pathMakefile
File metadata and controls
46 lines (34 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
CERT_DIR := e2e/certs
default: build
build:
env CGO_ENABLED=0 go build -ldflags="-s -w" -o probe ./cmd/probe/...
test:
go test ./... -coverprofile=coverage.out -covermode=count
lint:
golangci-lint run ./...
key:
@rm -rf keys/*.pem
@mkdir keys
@openssl req -x509 -days 10 -newkey ED25519 -nodes -out ./keys/cert.pem -keyout ./keys/key.pem -subj "/C=/ST=/L=/O=/OU=/CN=example.local" &>/dev/null
code:
#@which buf || brew install bufbuild/buf/buf
buf generate
http_server:
go run github.com/mccutchen/go-httpbin/v2/cmd/go-httpbin@latest -host 127.0.0.1 -port 8080
http_server_tls:
go run github.com/mccutchen/go-httpbin/v2/cmd/go-httpbin@latest -host 127.0.0.1 -port 8080 \
-https-cert-file ./e2e/certs/server.crt \
-https-key-file ./e2e/certs/server.key
grpc_server:
go run grpc/testserver/*.go
grpc_server_tls:
go run grpc/testserver/*.go \
-tls \
-cert="./e2e/certs/server.crt" \
-key="./e2e/certs/server.key" \
-port=50052
gen_server_keys:
e2e/gen.sh
gen_grpc_server:
@cd grpc/testserver && \
protoc --go_out=. --go-grpc_out=. ./pb/user_service.proto