grpc

module
v0.0.0-...-8772031 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2020 License: MIT

README

grpc 练习

Arch

  • hello-tls: grpc 基础练习,包含服务器和客户端,启用 TLS 公私钥加密

初始化

证书生成

使用 make

make init

证书自定义信息:

-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:helloserver
Email Address []:

重点在于 Common Name,在 google.golang.org/grpc/credentials.NewClientTLSFromFile 中需要设置 serverNameOverride 参数值

Directories

Path Synopsis
hello-tls
proto

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL