Go - Choosing a value or pointer receiver
摘要:Choosing a value or pointer receiver There are two reasons to use a pointer receiver. The first is so that the method can modify the value that its re
阅读全文
Go - Get the type and kind of a variable
摘要:type Person struct { Id int `json:"id"` GivenName string `json:"given_name"` FamilyName string `json:"family_name"` Email string `json:"email"` } func
阅读全文
Python - pyenv, venv, pyenv-virtualenv, pipenv
摘要:Pyenv可托管多个不同的Python版本。 Install pyenv: git clone https://github.com/pyenv/pyenv.git ~/.pyenv Add ~/.pyenv/bin to PATH: if [[
(echoPATH | grep 'pyenv
阅读全文
GRPC - Deploying: Envoy proxy
摘要:Install func-e: https://func-e.io/ func-e makes running Envoy® easy func-e (pronounced funky) allows you to quickly see available versions of Envoy an
阅读全文
Dockerfile - build zgrpc-go-professionals:client
摘要:FROM --platform=$BUILDPLATFORM alpine as protoc ARG BUILDPLATFORM=linux/amd64 TARGETOS=linux TARGETARCH=amd64 # download the protoc binary from github
阅读全文
Dockerfile - build zgrpc-go-professionals:server
摘要:FROM --platform=$BUILDPLATFORM alpine as protoc ARG BUILDPLATFORM=linux/amd64 TARGETOS=linux TARGETARCH=amd64 # download the protoc binary from github
阅读全文
GRPC - grpcurl: interact with gRPC servers
摘要:https://github.com/fullstorydev/grpcurl Install: go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest Add code to enable server reflection: i
阅读全文
GRPC - ghz: gRPC benchmarking and load testing tool
摘要:https://ghz.sh/ https://github.com/bojand/ghz Install using go >= 1.16 go install github.com/bojand/ghz/cmd/ghz@latest zzh@ZZHPC:/zdata/Github/zgrpc-g
阅读全文
k8s - ERROR: image can't be pulled
摘要:Tested the image: zzh@ZZHPC:/zdata/Github/zgrpc-go-professionals$ kubectl run mytest --image=zgrpc-go-professionals:server pod/mytest created zzh@ZZHP
阅读全文
Kind - Create a k8s cluster
摘要:kind.yaml: kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: - role: control-plane - role: worker - role: worker zzh@ZZHPC:~$ kubectl cluster-in
阅读全文
Dockerfile - build zgrpc-go-professionals:server
摘要:FROM --platform=$BUILDPLATFORM alpine as protoc ARG BUILDPLATFORM=linux/amd64 TARGETOS=linux TARGETARCH=amd64 # download the protoc binary from github
阅读全文
Docker Build - ERROR: RUN go mod tidy
摘要:=> ERROR [build 13/14] RUN go mod tidy 29.3s > [build 13/14] RUN go mod tidy: 0.270 go: finding module for package github.com/ZhangZhihuiAAA/zgrpc-go-
阅读全文