File tree Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Expand file tree Collapse file tree 2 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ Microservice framework implemented based on Golang.
24
24
## Framework
25
25
``` shell
26
26
├─api 存放与外部交互的接口及 proto 文件
27
- │ ├─metadata
27
+ │ ├─metadata 引用 kratos 发现所有 gRPC 服务接口
28
28
│ └─user
29
29
│ └─v1
30
30
├─app 具体服务相关的实现
@@ -52,15 +52,15 @@ Microservice framework implemented based on Golang.
52
52
│ ├─app.go user 服务生成逻辑
53
53
│ └─rpc.go user 模块的 rpc 服务 初始化逻辑
54
54
├─cmd 服务启动入口
55
- │ ├─admin
55
+ │ ├─admin 启动示例 admin 服务
56
56
│ └─user 启动示例 user 服务
57
57
├─configs 配置文件
58
58
│ ├─admin
59
59
│ └─user
60
60
├─gmicro 微服务相关包
61
61
│ ├─app 服务启动相关的结构体
62
62
│ │ └─app.go 这个 app 是 GRPC,服务名称,注册中心等的集合
63
- │ ├─code
63
+ │ ├─code 有一些公用的错误码
64
64
│ ├─core 底层共通核心的包
65
65
│ │ ├─metric
66
66
│ │ └─trace 链路追踪,采用 opentemlemetry
@@ -69,7 +69,7 @@ Microservice framework implemented based on Golang.
69
69
│ └─server
70
70
│ ├─restserver http 服务的初始化配置
71
71
│ │ ├─middlewares http 服务的中间件
72
- │ │ │ ├─auth
72
+ │ │ │ ├─auth 认证相关中间件,包括 jwt,cache,basic
73
73
│ │ │ └─tracing.go 只是向gin中封装了 jeager 的 span 的相关信息,待上报的时候,才能入库
74
74
│ │ ├─pprof http 服务的 pprof 相关逻辑
75
75
│ │ └─validation http 服务的参数校验
@@ -100,9 +100,9 @@ Microservice framework implemented based on Golang.
100
100
│ │ └─help.go 帮助信息
101
101
│ ├─common 共通相关的包
102
102
│ │ ├─auth
103
- │ │ ├─cli
103
+ │ │ ├─cli 命令行工具相关的包
104
104
│ │ │ ├─flag
105
- │ │ │ └─globalflag
105
+ │ │ │ └─globalflag 全局命令行工具
106
106
│ │ ├─core
107
107
│ │ ├─json
108
108
│ │ ├─meta
@@ -130,7 +130,7 @@ Microservice framework implemented based on Golang.
130
130
│ │ │ └─wait
131
131
│ │ ├─validation
132
132
│ │ │ └─field
133
- │ │ └─version
133
+ │ │ └─version 服务的版本号
134
134
│ │ └─verflag
135
135
│ ├─errors 基础的 error 包 可以单独使用
136
136
│ ├─host
Original file line number Diff line number Diff line change @@ -9,15 +9,11 @@ import (
9
9
"syscall"
10
10
"time"
11
11
12
- "golang.org/x/sync/errgroup"
13
-
12
+ "github.com/CoderI421/gframework/gmicro/registry"
14
13
"github.com/CoderI421/gframework/gmicro/server"
15
-
16
14
"github.com/CoderI421/gframework/pkg/log"
17
-
18
15
"github.com/google/uuid"
19
-
20
- "github.com/CoderI421/gframework/gmicro/registry"
16
+ "golang.org/x/sync/errgroup"
21
17
)
22
18
23
19
type App struct {
You can’t perform that action at this time.
0 commit comments