-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvars.go
62 lines (50 loc) · 1 KB
/
vars.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package stark
// 数据库类型
type DbType int32
const (
DbTypeMyql DbType = 1
DbTypeRedis DbType = 2
)
var (
DbTypeText = map[DbType]string{
DbTypeMyql: "MySQL",
DbTypeRedis: "Redis",
}
)
// 应用类型
type AppType int32
const (
AppTypeWeb AppType = 1
AppTypeGrpc AppType = 2
AppTypeHttp AppType = 3
AppTypeCron AppType = 4
AppTypeQueue AppType = 5
)
var (
AppTypeMap = map[AppType]string{
AppTypeWeb: "Web",
AppTypeGrpc: "gRPC",
AppTypeHttp: "Http",
AppTypeCron: "Cron",
AppTypeQueue: "Queue",
}
)
// 框架策略
type FrameworkStrategy int32
const (
GinFrameworkStrategy FrameworkStrategy = 1
EchoFrameworkStrategy FrameworkStrategy = 2
)
// 服务发现策略
type DiscoveryStrategy int32
const (
ConsulDiscoveryStrategy DiscoveryStrategy = 1
EtcdDiscoveryStrategy DiscoveryStrategy = 2
)
// WebInstance is *WebApplication instance May be nil
var WebInstance *WebApplication
var (
DiscoverySchemeUrl string
// 是否启用链路追踪功能
IsEnableTrace bool
)