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
63
64
65
66
67
68
69
70
71
72
73
74
75
Name: registration.rpc
ListenOn: 0.0.0.0:8082
# 当前服务请求超时时间是 30s
Timeout: 30000
# 环境:dev、test、pre、prod
RpcServerConf:
Mode: dev
Log:
# 服务名称
ServiceName: registration-service
# 日志输出到文件
Mode: file
# 日志输出文件路径
Path: logs
# 日志级别
Level: info
# 是否压缩日志
Compress: true
# 日志保留天数,只有在文件模式才会生效
KeepDays: 180
# 按天切割日志
Rotation: daily
# 日志时间格式
TimeFormat: "2006-01-02 15:04:05"
# 监控,默认都是开启,主要调整端口和监控访问路由
DevServer:
Port: 6066
HealthPath: "/health"
MetricsPath: "/metrics"
# grpc 通信服务端证书私钥
GrpcServerConf:
# CertFile: ./cert/registration-service/server.pem
# KeyFile: ./cert/registration-service/server.key
CertFile:
KeyFile:
# 接收、发送消息大小设置为 20 mb,根据服务实际场景调整
MaxRecvMsgSize: 20971520
MaxSendMsgSize: 20971520
# 数据库连接限流速率
TestDBConnRate: 10
MysqlDNS: root:root123456@tcp(192.168.1.135:3306)/registration_service?charset=utf8&parseTime=true&loc=Asia%2FShanghai
# redis 缓存配置,主要指定访问地址,其他配置项默认即可
Cache:
- Host: 192.168.1.135:6379
Pass: "123456"
# Event 链上事件
EventConf:
Host: "192.168.1.135"
Port: 6379
Password: "123456"
GrpcConfs:
key-service:
ClientCertFile: ./cert/key-service/client.pem
ClientKeyFile: ./cert/key-service/client.key
CaCertFile: ./cert/ca/ca.pem
DNS: localhost
Endpoint: 192.168.1.134:8083
chain-service:
ClientCertFile: ./cert/chain-service/client.pem
ClientKeyFile: ./cert/chain-service/client.key
CaCertFile: ./cert/ca/ca.pem
DNS: localhost
Endpoint: 192.168.1.134:8081