-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfig.toml
117 lines (99 loc) · 2.74 KB
/
config.toml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
### 配置参考
[websocket]
# dolphin 对外提供websocket连接服务的地址
listen = "127.0.0.1:8080"
read_buf_size = 1024
write_buf_size = 1204
write_time_wait = "10s"
read_time_wait = "30s"
idle_session_timeout = "55s"
session_queue_size = 128
queue_out_timeout = "50μs"
id_salt = "u2@QcR88yp#1nb"
[websocket.tls]
enabled = false
http_redirect = ":80"
cert_file = "/path/to/certfile"
key_file = "/path/to/keyfile"
# 以下设置将优先于cert file 和key file
[websocket.tls.autocert]
#Location of certificates.
cert_cache = "/etc/letsencrypt/live/your.domain.here"
# Contact address for this installation. LetsEncrypt will send
# messages to this address in case of problems. Replace with your
# own address or remove this line.
email = "noreply@example.com"
# Domains served. Replace with your own domain name.
domains = ["whatever.example.com"]
##################################################################################################
[cluster]
# 当前自身节点的名称
self = ""
[cluster.connection]
# net/rpc 客户端连接超时时间
dial_timeout = "5s"
# 以下四个参数设置 回退算法的参数值
max_delay = "1m"
base_delay = "1s"
factor = 1.6
jitter = 0.2
# 是否启用超时机制的请求
disable_request_timeout = false
# 超时时长
request_wait_after = "1m"
[[cluster.nodes]]
name = "node1"
address = "127.0.0.1:40051"
[[cluster.nodes]]
name = "node2"
address = "127.0.0.1:40052"
[[cluster.nodes]]
name = "node3"
address = "127.0.0.1:40053"
[cluster.failover]
# 是否启用容错
enabled = true
# 心跳间隔时间
# 一个心跳周期到达时维持两种关系:1、主节点向从节点发送ping心跳检测;2、发送主节点投票选举
# 心跳间隔规则:1、字符串;2、ms后缀表示毫秒,s后缀表示秒,m后缀表示分。心跳是毫秒级的,因此常用ms后缀
heartbeat = "100ms"
# 在n个心跳周期之后如果仍然没可用的主节点,将发起主节点选举
vote_after = 8
# 在n个心跳周期之后,节点仍然没有正常响应,将视作该节点不可用
node_fail_after = 16
##################################################################################################
[route]
# appclient请求错误计数周期
recycle = "10s"
# recycel周期内的错误数阙值
threshold = 5
# appclient请求超时时间
timeout = "60s"
heartBeat = "2s"
[routehttp]
address = "127.0.0.1:9527"
[scheduler]
address = "127.0.0.1:9528"
[kafka]
enable = true
[[kafka.topics]]
brokers = ["192.168.10.189:9092"]
topic = "dolphinhub"
offset = 0
groupId = ""
partition = 0
minBytes = 1000
maxBytes = 1000000
maxWait = "2s"
[limit]
maxNum = 65536
maxRate = 50
maxBurst = 5
[login]
resource = "User"
version = "v1"
action = "login"
[[whiteList]]
resource = "User"
version = "v1"
action = "SendCode"