02 2023 档案

摘要:Golang微服务(三) 分布式锁 gRPC service层demo router handler如下: /* >>>model type Inventory struct { BaseModel Goods int32 `gorm:"type:int;index"` Stocks int32 ` 阅读全文

posted @ 2023-02-28 20:30 呱呱呱呱叽里呱啦 编辑

摘要:Golang微服务(二) 注册中心 选型 注册中心要综合考虑: 功能是否完善 是否易用 是否可配置 是否支持健康检查 是否支持多数据中心 是否支持服务发现 基于上述考虑,consul是不错的选择 consul环境 文档:https://developer.hashicorp.com/consul/d 阅读全文

posted @ 2023-02-26 03:41 呱呱呱呱叽里呱啦 编辑

摘要:Golang微服务(一) 一、protobuf常规使用及踩坑记录 1.类型映射关系及零值 关于protobuf的文档见:Protocol Buffers Documentation (protobuf.dev),文档中可见protobuf与go语言的类型映射关系,以及各种类型的零值。当message 阅读全文

posted @ 2023-02-20 12:57 呱呱呱呱叽里呱啦 编辑

点击右上角即可分享
微信分享提示