-
Notifications
You must be signed in to change notification settings - Fork 42
/
sandesh.sandesh
83 lines (78 loc) · 1.51 KB
/
sandesh.sandesh
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
/*
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
*/
/*
* sandesh.sandesh
*
* Sandesh definitions
*/
enum SandeshType {
INVALID = 0,
SYSTEM = 1,
REQUEST = 2,
RESPONSE = 3,
TRACE = 4,
BUFFER = 5,
UVE = 6,
OBJECT = 7,
FLOW = 8,
TRACE_OBJECT = 9,
SYSLOG = 10,
ALARM = 11
}
enum SandeshLevel {
/*
* Syslog severity levels
*/
SYS_EMERG = 0,
SYS_ALERT = 1,
SYS_CRIT = 2,
SYS_ERR = 3,
SYS_WARN = 4,
SYS_NOTICE = 5,
SYS_INFO = 6,
SYS_DEBUG = 7,
/*
* User defined levels
*/
/*
* Unit test levels
*/
UT_START = 200,
UT_EMERG = 200,
UT_ALERT = 201,
UT_CRIT = 202,
UT_ERR = 203,
UT_WARN = 204,
UT_NOTICE = 205,
UT_INFO = 206,
UT_DEBUG = 207,
UT_END = 207,
/*
* Invalid
*/
INVALID = 0x7fffffff
}
const i32 SANDESH_KEY_HINT = 0x1
const i32 SANDESH_CONTROL_HINT = 0x2
const i32 SANDESH_SYNC_HINT = 0x4
const u32 DEFAULT_SANDESH_SEND_RATELIMIT = 100
// Update ParseHeader function in sandesh_message_builder.cc
// when modifying SandeshHeader below
struct SandeshHeader {
1: string Namespace;
2: i64 Timestamp;
3: string Module;
4: string Source;
5: string Context;
6: i32 SequenceNum;
7: i32 VersionSig;
8: SandeshType Type;
9: i32 Hints;
10: i32 Level;
11: string Category;
12: string NodeType;
13: string InstanceId;
14: optional string IPAddress;
15: optional i32 Pid;
}