forked from galaxydi/go-loghub
-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathlog.proto
54 lines (44 loc) · 1021 Bytes
/
log.proto
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
syntax = "proto2";
package sls;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.sizer_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
message LogContent
{
required string Key = 1;
required string Value = 2;
}
message Log
{
required uint32 Time = 1;// UNIX Time Format
repeated LogContent Contents= 2;
optional fixed32 TimeNs = 4;
}
message LogTag
{
required string Key = 1;
required string Value = 2;
}
message LogGroup
{
repeated Log Logs= 1;
optional string Category = 2;
optional string Topic = 3;
optional string Source = 4;
optional string MachineUUID = 5;
repeated LogTag LogTags = 6;
}
message SlsLogPackage
{
required bytes data = 1; // the serialized data of LogGroup , may be compressed
optional int32 uncompress_size = 2;
}
message SlsLogPackageList
{
repeated SlsLogPackage packages = 1;
}
message LogGroupList
{
repeated LogGroup LogGroups = 1;
}