forked from TarsCloud/TarsGo
-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.go
61 lines (53 loc) · 1.04 KB
/
config.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
package tars
import (
"tars/util/endpoint"
)
var svrCfg *serverConfig
var cltCfg *clientConfig
// GetServerConfig : Get server config
func GetServerConfig() *serverConfig {
Init()
return svrCfg
}
// GetClientConfig : Get client config
func GetClientConfig() *clientConfig {
Init()
return cltCfg
}
type adapterConfig struct {
Endpoint endpoint.Endpoint
Protocol string
Obj string
Threads int
}
type serverConfig struct {
Node string
App string
Server string
LogPath string
LogSize uint64
LogNum uint64
LogLevel string
Version string
LocalIP string
BasePath string
DataPath string
config string
notify string
log string
netThread int
Adapters map[string]adapterConfig
Container string
Isdocker bool
Enableset bool
Setdivision string
}
type clientConfig struct {
Locator string
stat string
property string
modulename string
refreshEndpointInterval int
reportInterval int
AsyncInvokeTimeout int
}