摘要: codec 用于各种信息的加解密,具体接口如下: // Codec encodes/decodes various types of messages used within go-micro. // ReadHeader and ReadBody are called in pairs to re 阅读全文
posted @ 2021-04-19 17:34 林锅 阅读(117) 评论(0) 推荐(0) 编辑
摘要: selecor是一种基于registry的选择服务节点和标记它们状态的的机制,有Random、RoundRobin两种策略,代码如下: // Selector builds on the registry as a mechanism to pick nodes // and mark their 阅读全文
posted @ 2021-04-19 16:22 林锅 阅读(354) 评论(0) 推荐(0) 编辑