forked from cat-go/cat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst.go
90 lines (71 loc) · 1.77 KB
/
const.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
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
package cat
import (
"time"
)
const (
GoCatVersion = "2.0.0"
)
const (
SUCCESS = "0"
ERROR = "-1"
FAIL = "fail"
)
const ( // Declared default values.
defaultAppKey = "cat"
defaultHostname = "GoUnknownHost"
defaultEnv = "dev"
defaultIp = "127.0.0.1"
defaultIpHex = "7f000001"
defaultXmlFile = "/data/appdatas/cat/client.xml"
defaultLogDir = "/data/applogs/cat"
)
const ( // Declared properties given by the router server.
propertySample = "sample"
propertyRouters = "routers"
propertyBlock = "block"
)
const (
highPriorityQueueSize = 1000
normalPriorityQueueSize = 5000
transactionAggregatorChannelCapacity = 1000
eventAggregatorChannelCapacity = 1000
metricAggregatorChannelCapacity = 1000
transactionAggregatorInterval = time.Second * 3
eventAggregatorInterval = time.Second * 3
metricAggregatorInterval = time.Second * 3
)
const ( // Declared a series of reserved type and names.
typeSystem = "System"
nameReboot = "Reboot"
nameTransactionAggregator = "TransactionAggregator"
nameEventAggregator = "EventAggregator"
nameMetricAggregator = "MetricAggregator"
)
const (
signal0 = iota
signalResetConnection
signalShutdown
signalSenderExit
signalMonitorExit
signalRouterExit
signalTransactionAggregatorExit
signalEventAggregatorExit
signalMetricAggregatorExit
)
const (
RootId = "X-ROOT-MESSAGE-ID"
ParentId = "X-ROOT-PARENT-ID"
ChildId = "X-ROOT-CHILD-ID"
TypeUrl = "URL"
TypeUrlMethod = "URL.method"
TypeUrlForward = "URL.Forward"
TypeRemoteCall = "RemoteCall"
TypeUrlClient = "URL.client"
TypeRedis = "REDIS"
TypeRedisCmd = "REDIS.cmd"
TypeSql = "SQL"
TypeSqlOp = "SQL.op"
TypeSqlVal = "SQL.val"
TypeMQ = "MQ"
TypeMQTopic = "MQ.topic"
)