forked from HuaweiTech/gorouter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
envelope.pb.go
165 lines (143 loc) · 4.15 KB
/
envelope.pb.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
// Code generated by protoc-gen-gogo.
// source: envelope.proto
// DO NOT EDIT!
/*
Package events is a generated protocol buffer package.
It is generated from these files:
envelope.proto
heartbeat.proto
http.proto
log.proto
metric.proto
It has these top-level messages:
Envelope
*/
package events
import proto "code.google.com/p/gogoprotobuf/proto"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = math.Inf
type Envelope_EventType int32
const (
Envelope_Heartbeat Envelope_EventType = 1
Envelope_HttpStart Envelope_EventType = 2
Envelope_HttpStop Envelope_EventType = 3
Envelope_HttpStartStop Envelope_EventType = 4
Envelope_LogMessage Envelope_EventType = 5
Envelope_ValueMetric Envelope_EventType = 6
Envelope_CounterEvent Envelope_EventType = 7
)
var Envelope_EventType_name = map[int32]string{
1: "Heartbeat",
2: "HttpStart",
3: "HttpStop",
4: "HttpStartStop",
5: "LogMessage",
6: "ValueMetric",
7: "CounterEvent",
}
var Envelope_EventType_value = map[string]int32{
"Heartbeat": 1,
"HttpStart": 2,
"HttpStop": 3,
"HttpStartStop": 4,
"LogMessage": 5,
"ValueMetric": 6,
"CounterEvent": 7,
}
func (x Envelope_EventType) Enum() *Envelope_EventType {
p := new(Envelope_EventType)
*p = x
return p
}
func (x Envelope_EventType) String() string {
return proto.EnumName(Envelope_EventType_name, int32(x))
}
func (x *Envelope_EventType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Envelope_EventType_value, data, "Envelope_EventType")
if err != nil {
return err
}
*x = Envelope_EventType(value)
return nil
}
type Envelope struct {
Origin *string `protobuf:"bytes,1,req,name=origin" json:"origin,omitempty"`
EventType *Envelope_EventType `protobuf:"varint,2,req,name=eventType,enum=events.Envelope_EventType" json:"eventType,omitempty"`
Timestamp *int64 `protobuf:"varint,6,opt,name=timestamp" json:"timestamp,omitempty"`
Heartbeat *Heartbeat `protobuf:"bytes,3,opt,name=heartbeat" json:"heartbeat,omitempty"`
HttpStart *HttpStart `protobuf:"bytes,4,opt,name=httpStart" json:"httpStart,omitempty"`
HttpStop *HttpStop `protobuf:"bytes,5,opt,name=httpStop" json:"httpStop,omitempty"`
HttpStartStop *HttpStartStop `protobuf:"bytes,7,opt,name=httpStartStop" json:"httpStartStop,omitempty"`
LogMessage *LogMessage `protobuf:"bytes,8,opt,name=logMessage" json:"logMessage,omitempty"`
ValueMetric *ValueMetric `protobuf:"bytes,9,opt,name=valueMetric" json:"valueMetric,omitempty"`
CounterEvent *CounterEvent `protobuf:"bytes,10,opt,name=counterEvent" json:"counterEvent,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Envelope) Reset() { *m = Envelope{} }
func (m *Envelope) String() string { return proto.CompactTextString(m) }
func (*Envelope) ProtoMessage() {}
func (m *Envelope) GetOrigin() string {
if m != nil && m.Origin != nil {
return *m.Origin
}
return ""
}
func (m *Envelope) GetEventType() Envelope_EventType {
if m != nil && m.EventType != nil {
return *m.EventType
}
return Envelope_Heartbeat
}
func (m *Envelope) GetTimestamp() int64 {
if m != nil && m.Timestamp != nil {
return *m.Timestamp
}
return 0
}
func (m *Envelope) GetHeartbeat() *Heartbeat {
if m != nil {
return m.Heartbeat
}
return nil
}
func (m *Envelope) GetHttpStart() *HttpStart {
if m != nil {
return m.HttpStart
}
return nil
}
func (m *Envelope) GetHttpStop() *HttpStop {
if m != nil {
return m.HttpStop
}
return nil
}
func (m *Envelope) GetHttpStartStop() *HttpStartStop {
if m != nil {
return m.HttpStartStop
}
return nil
}
func (m *Envelope) GetLogMessage() *LogMessage {
if m != nil {
return m.LogMessage
}
return nil
}
func (m *Envelope) GetValueMetric() *ValueMetric {
if m != nil {
return m.ValueMetric
}
return nil
}
func (m *Envelope) GetCounterEvent() *CounterEvent {
if m != nil {
return m.CounterEvent
}
return nil
}
func init() {
proto.RegisterEnum("events.Envelope_EventType", Envelope_EventType_name, Envelope_EventType_value)
}