Go-micro 简介
一句话介绍
Go Micro CLI is the command line interface for developing Go Micro projects.
开始表演
- 安装
| |
- 创建测试项目(执行命令,后续根据命令提示操作)
| |
- 创建工程化项目(执行命令,后续根据命令提示操作)
| |
注: 1、 Since Kubernetes 1.24, probes can make use of the gRPC Health Protocol. This allows you to directly probe the go-micro service in a Kubernetes container if it implements the health protocol. 2、By default, go-micro uses an JSON/HTTP RPC server. Many microservice use cases require a gRPC server or client, therefore, go-micro offers a gRPC server built in. gRPC默认使用HTTP/2作为其传输协议,并使用Protocol Buffers(protobuf)作为默认的消息序列化和接口定义语言
添加工程化插件 1、consul 配置和服务发现中心
本地测试接口
测试非流
| |
测试单流
| |
测试双向流
| |
或者 curl
| |
探索
- 阅读 examples
- 尝试 plugins