-
Notifications
You must be signed in to change notification settings - Fork 5
/
config.toml
74 lines (69 loc) · 3.31 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
# HTTP Server
[server]
Address = ":9000"
ServerAgent = "example"
LogPath = "./logs/server"
# Logger.
[logger]
Path = "./logs/app"
Level = "all"
Stdout = true
[nacos]
# 应用标识
AppName = "example"
# 运行模式
Mode = "dev"
# 配置文件类型
FileExtension = "toml"
# 是否启用nacos作为配置中心
EnableConfig = true
# 是否启用nacos用为服务发现注册中心
EnableDiscovery = true
# 应用的监听端口
AppPort = 9000
# 配置文件的Group属性,默认为public
ConfigGroup = "public"
# 服务注册中的Group属性,默认为DEFAULT_GROUP
DiscoveryGroup = "DEFAULT_GROUP"
# 服务器的IP,在gateway中将通过该ip对外提供服务
AppIp = "172.16.1.106"
# 服务注册时的meta参数,全部自定义
[nacos.meta]
private = "false"
# nacos配置中心的配置参数,配置来自:https://github.com/nacos-group/nacos-sdk-go/blob/master/common/constant/config.go的ClientConfig
[nacos.config]
TimeoutMs = 5000
NotLoadCacheAtStart = true
RotateTime = "1h"
MaxAge = 3
LogLevel = "debug"
#TimeoutMs uint64 //timeout for requesting Nacos server, default value is 10000ms
#ListenInterval uint64 //Deprecated
#BeatInterval int64 //the time interval for sending beat to server,default value is 5000ms
#NamespaceId string //the namespaceId of Nacos
#Endpoint string //the endpoint for get Nacos server addresses
#RegionId string //the regionId for kms
#AccessKey string //the AccessKey for kms
#SecretKey string //the SecretKey for kms
#OpenKMS bool //it's to open kms,default is false. https://help.aliyun.com/product/28933.html
#CacheDir string //the directory for persist nacos service info,default value is current path
#UpdateThreadNum int //the number of gorutine for update nacos service info,default value is 20
#NotLoadCacheAtStart bool //not to load persistent nacos service info in CacheDir at start time
#UpdateCacheWhenEmpty bool //update cache when get empty service instance from server
#Username string //the username for nacos auth
#Password string //the password for nacos auth
#LogDir string //the directory for log, default is current path
#RotateTime string //the rotate time for log, eg: 30m, 1h, 24h, default is 24h
#MaxAge int64 //the max age of a log file, default value is 3
#LogLevel string //the level of log, it's must be debug,info,warn,error, default value is info
#ContextPath string //the nacos server contextpath
# nacos服务发现配置参数,来自:https://github.com/nacos-group/nacos-sdk-go/blob/master/common/constant/config.go的ServerConfig
[nacos.discovery]
Scheme = "http"
ContextPath = "/nacos"
IpAddr = "127.0.0.1"
Port = 8848
#Scheme string //the nacos server scheme
#ContextPath string //the nacos server contextpath
#IpAddr string //the nacos server address
#Port uint64 //the nacos server port