Jjoengtouinjoengtou.hashnode.dev·Jun 27, 2022 · 1 min readLearn-go-with-eleven-projectslink to github00
Jjoengtouinjoengtou.hashnode.dev·Jun 24, 2022 · 1 min readgRPC(A high performance, open source universal RPC framework)grpc QuickStart Prerequisites $ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28 $ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2 use follow comand to protoc your .pb file // protoc-gen-go 序列化message体 // protoc-gen-go-grpc...00
Jjoengtouinjoengtou.hashnode.dev·Jun 23, 2022 · 2 min readrobfig/cron(a cron library for go)use like linux crontab for golang link The demo code package main import ( "github.com/robfig/cron/v3" "log" ) func main() { // use WithSeconds to alow seconds,default not c := cron.New(cron.WithSeconds()) _, err := c.AddFunc...00
Jjoengtouinjoengtou.hashnode.dev·Jun 23, 2022 · 2 min readNSQ(A realtime distributed messaging platform)nsq 重要组件 nsqd 开放tcp:4150,http:4151端口与生产消费者通信,连接nsqlookup的4160端口注册,上报心跳 nsqlookupd 守护进程负责nsqd服务发现 开放http:4161,供nsqadmin和消费者查询当前nsqd列表等信息,开放tcp:4160端口给nsqd注册 nsqadmin 前端可视化页面,开放http:4171端口,连接nsqlookupd的4161端口查询数据 部署测试 docker-compose 官方配置文件没有指定端口映射,以...00
Jjoengtouinjoengtou.hashnode.dev·Jun 22, 2022 · 1 min readTLS(Transport Layer Security)TLS(Transport Layer Security), base on TCP, build from SSL(Secure Socket Layer). 1. Why? 应用层的报文明文传输,存在安全性,可靠性问题,所以在应用层和传输层中间加上SSL/TSL协议 2. What? 保密(message privacy) 完整性(message integrity) 认证(mutual authentication)00