forked from cloudfoundry/gorouter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
envelope.pb.go
113 lines (96 loc) · 2.76 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
// 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
It has these top-level messages:
Envelope
*/
package events
import proto "code.google.com/p/gogoprotobuf/proto"
import json "encoding/json"
import math "math"
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf
type Envelope_EventType int32
const (
Envelope_Heartbeat Envelope_EventType = 1
Envelope_HttpStart Envelope_EventType = 2
Envelope_HttpStop Envelope_EventType = 3
)
var Envelope_EventType_name = map[int32]string{
1: "Heartbeat",
2: "HttpStart",
3: "HttpStop",
}
var Envelope_EventType_value = map[string]int32{
"Heartbeat": 1,
"HttpStart": 2,
"HttpStop": 3,
}
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"`
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"`
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) 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 init() {
proto.RegisterEnum("events.Envelope_EventType", Envelope_EventType_name, Envelope_EventType_value)
}