Stop google's country redirect
摘要:Use this URL: https://www.google.com/ncr
阅读全文
Go - go build -ldflags
摘要:# download dependencies and build RUN go mod download RUN CGO_ENABLED=0 GOOS=
TARGETOSGOARCH=TARGETARCH go build -ldflags="-s -w" -o /go/bin/server
阅读全文
GRPC - ERROR: grpc: Decompressor is not installed for grpc-encoding "gzip"
摘要:This is because I forgot doing this:
阅读全文
GRPC - ERROR: rpc error: code = Unimplemented desc = unknown service pb.TodoService
摘要:This is because you didn't register the service. After adding below code the error disappeared: pb.RegisterTodoServiceServer(s, &server{ d: NewDb(), }
阅读全文
VSCode - Hanging when save go file
摘要:Click the "configure" link and input the the following:
阅读全文
GRPC - Tracing API calls
摘要:grpcprom "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/c
阅读全文
GRPC - Securing connections
摘要:server_cert.pem: https://github.com/grpc/grpc-go/tree/master/examples/data/x509/server_cert.pem server_key.pem: https://github.com/grpc/grpc-go/tree/m
阅读全文
GRPC - certificate error
摘要:2024/04/12 16:09:36 rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: failed to verify c
阅读全文
GRPC - Creds
摘要:zzh@ZZHPC:/zdata/Github/grpc-go/server$ go doc grpc.Creds package grpc // import "google.golang.org/grpc" func Creds(c credentials.TransportCredential
阅读全文
GRPC - metadata
摘要:"google.golang.org/grpc/metadata"
阅读全文
Zgo - util.go
摘要:package main import ( "fmt" "log" "unsafe" "golang.org/x/exp/constraints" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/proto
阅读全文
Protobuf - Well-Known Types and Google Common Types
摘要:Any (message) Api (message) BoolValue (message) BytesValue (message) DoubleValue (message) Duration (message) Empty (message) Enum (message) EnumValue
阅读全文
Protobuf - Scalar Types
摘要:Scalar Value Types A scalar message field can have one of the following types – the table shows the type specified in the .proto file, and the corresp
阅读全文
Znote - RPC operations
摘要:Each interaction done with gRPC between the server and the client can be described as four RPC operations. These operations are composed in a way that
阅读全文
Cloud-Native - On-site, Iaas, Paas, SaaS
摘要:The goal pursued by cloud-native, that is, the use of modern container technology, constantly moves the nonfunctional requirements required by the app
阅读全文
Go - Using Reflection
摘要:Reflection can be used to inspect the type of variables and to dynamically access and modify their values. Following is a simple example of using refl
阅读全文