gozero
Contents
microservice framework: 提供工具以方便构建微服务,通常以rpc 通信为核心
framework basic tool:
- service discovery: based on etcd,consual
- transport : based on grpc ….
go zero 框架:
- go-kit
- go-micro
- go-zero
go-micro:
gateway-> aggregated service-> single service
go zero
architecture: 基于rpc封装;
- api 聚合服务
- rpc 单个服务
the component: api: 聚合服务 rpc:特定服务
服务注册发现
basic router: path, handler hander: srvContext,
arhitecture
框架特点:
- controller
- service
- service.repo
- service.rpc
rpc 框架
- api
- handler-> logic: call rpc
- rpc
- servicesA
- servicesB
rest server:
|
|
rpc server:
|
|
go zero框架 是什么:
- rpc封装: context;
- client.SvxContextg
基于rpc 的封装, baohang